Skip to content

Commit 192168b

Browse files
authored
[yql] gateway extension contains only additional settings (#700)
1 parent eda727a commit 192168b

File tree

4 files changed

+19
-239
lines changed

4 files changed

+19
-239
lines changed

ydb/library/yql/cfg/tests/gateways-experimental.conf

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -1,234 +1,5 @@
1-
Yt {
2-
GatewayThreads: 0
3-
YtLogLevel: YL_INFO
4-
5-
DefaultSettings {
6-
Name: "InferSchemaMode"
7-
Value: "rpc"
8-
}
9-
10-
DefaultSettings {
11-
Name: "DQRPCReaderInflight"
12-
Value: "10"
13-
}
14-
15-
DefaultSettings {
16-
Name: "UseRPCReaderInDq"
17-
Value: "true"
18-
}
19-
20-
DefaultSettings {
21-
Name: "DefaultMaxJobFails"
22-
Value: "1"
23-
}
24-
25-
DefaultSettings {
26-
Name: "ReleaseTempData"
27-
Value: "immediate"
28-
}
29-
30-
DefaultSettings {
31-
Name: "NativeYtTypeCompatibility"
32-
Value: "all"
33-
}
34-
35-
DefaultSettings {
36-
Name: "UseYqlRowSpecCompactForm"
37-
Value: "true"
38-
}
39-
40-
DefaultSettings {
41-
Name: "UseNewPredicateExtraction"
42-
Value: "true"
43-
}
44-
45-
DefaultSettings {
46-
Name: "PruneKeyFilterLambda"
47-
Value: "true"
48-
}
49-
50-
DefaultSettings {
51-
Name: "_UseKeyBoundApi"
52-
Value: "true"
53-
}
54-
55-
DefaultSettings {
56-
Name: "JoinCommonUseMapMultiOut"
57-
Value: "true"
58-
}
59-
60-
DefaultSettings {
61-
Name: "UseAggPhases"
62-
Value: "true"
63-
}
64-
65-
DefaultSettings {
66-
Name: "_EnableWriteReorder"
67-
Value: "true"
68-
}
69-
70-
DefaultSettings {
71-
Name: "_EnableYtPartitioning"
72-
Value: "true"
73-
}
74-
75-
DefaultSettings {
76-
Name: "TableContentLocalExecution"
77-
Value: "true"
78-
}
79-
80-
RemoteFilePatterns {
81-
Pattern: "yt://([a-zA-Z0-9\\-_]+)/([^&@?]+)$"
82-
Cluster: "$1"
83-
Path: "$2"
84-
}
85-
86-
RemoteFilePatterns {
87-
Pattern: "https?://yt\\.yandex(\\.net|-team\\.ru)/([a-zA-Z0-9\\-_]+)/#page=navigation&path=//([^&]+)$"
88-
Cluster: "$2"
89-
Path: "$3"
90-
}
91-
92-
RemoteFilePatterns {
93-
Pattern: "https?://yt\\.yandex(\\.net|-team\\.ru)/([a-zA-Z0-9\\-_]+)/navigation\\?path=//([^&]+)$"
94-
Cluster: "$2"
95-
Path: "$3"
96-
}
97-
98-
RemoteFilePatterns {
99-
Pattern: "https?://([a-zA-Z0-9\\-_]+)\\.yt\\.yandex(\\.net|-team\\.ru)/api/v(2/download|3/read_file)\\?(|.+&)path=//([^&]+)($|&.*)"
100-
Cluster: "$1"
101-
Path: "$5"
102-
}
103-
}
104-
105-
SqlCore {
106-
TranslationFlags: ["FlexibleTypes", "DisableAnsiOptionalAs", "EmitAggApply"]
107-
}
108-
1091
YqlCore {
110-
Flags {
111-
Name: "DisableYsonCastToString"
112-
}
113-
Flags {
114-
Name: "_EnableMatchRecognize"
115-
}
1162
Flags {
1173
Name: "UseBlocks"
1184
}
1195
}
120-
121-
Dq {
122-
DefaultSettings {
123-
Name: "EnableLLVM"
124-
Value: "true"
125-
}
126-
127-
DefaultSettings {
128-
Name: "EnableInsert"
129-
Value: "true"
130-
}
131-
132-
DefaultSettings {
133-
Name: "EnableFullResultWrite"
134-
Value: "true"
135-
}
136-
137-
DefaultSettings {
138-
Name: "_EnablePrecompute"
139-
Value: "true"
140-
}
141-
142-
DefaultSettings {
143-
Name: "_LiteralTimeout"
144-
Value: "3600000"
145-
}
146-
147-
DefaultSettings {
148-
Name: "_TableTimeout"
149-
Value: "3600000"
150-
}
151-
DefaultSettings {
152-
Name: "EnableComputeActor"
153-
Value: "1"
154-
}
155-
DefaultSettings {
156-
Name: "ComputeActorType"
157-
Value: "async"
158-
}
159-
160-
DefaultSettings {
161-
Name: "UseAggPhases"
162-
Value: "true"
163-
}
164-
165-
DefaultSettings {
166-
Name: "HashJoinMode"
167-
Value: "grace"
168-
}
169-
170-
DefaultSettings {
171-
Name: "UseFastPickleTransport"
172-
Value: "true"
173-
}
174-
175-
DefaultSettings {
176-
Name: "UseOOBTransport"
177-
Value: "true"
178-
}
179-
180-
DefaultSettings {
181-
Name: "UseFinalizeByKey"
182-
Value: "true"
183-
}
184-
185-
DefaultSettings {
186-
Name: "EnableDqReplicate"
187-
Value: "true"
188-
}
189-
190-
DefaultSettings {
191-
Name: "UseWideChannels"
192-
Value: "true"
193-
}
194-
}
195-
196-
Fs {
197-
CustomSchemes {
198-
Pattern: "sbr:(?://)?(\\d+)"
199-
TargetUrl: "https://proxy.sandbox.yandex-team.ru/$1"
200-
}
201-
CustomSchemes {
202-
# backward compatibility rule
203-
Pattern: "yt://([a-zA-Z0-9\\-_]+)/(.+)@t=([^&=]+)"
204-
TargetUrl: "yt://$1/$2?transaction_id=$3"
205-
}
206-
CustomSchemes {
207-
Pattern: "https?://yt\\.yandex(?:\\.net|-team\\.ru)/([a-zA-Z0-9\\-_]+)/#page=navigation&(.+)"
208-
TargetUrl: "yt://$1/?$2"
209-
}
210-
CustomSchemes {
211-
Pattern: "https?://yt\\.yandex(?:\\.net|-team\\.ru)/([a-zA-Z0-9\\-_]+)/navigation\\?(.+)"
212-
TargetUrl: "yt://$1/?$2"
213-
}
214-
CustomSchemes {
215-
Pattern: "https?://([a-zA-Z0-9\\-_]+)\\.yt\\.yandex(?:\\.net|-team\\.ru)/api/v3/read_file\\?(.+)"
216-
TargetUrl: "yt://$1/?$2"
217-
}
218-
CustomSchemes {
219-
Pattern: "https?://a\\.yandex-team\\.ru/(?:arc|svn)/(.+)/arcadia/(.+)\\?rev=r?(\\d+)"
220-
TargetUrl: "arc:/$2?rev=$3&branch=$1"
221-
}
222-
CustomSchemes {
223-
Pattern: "https?://a(?:rcanum)?\\.yandex-team\\.ru/arcadia/(.+)\\?rev=r(\\d+)"
224-
TargetUrl: "arc:/$1?rev=$2"
225-
}
226-
CustomSchemes {
227-
Pattern: "https?://a(?:rcanum)?\\.yandex-team\\.ru/arcadia/(.+)\\?rev=([^r].*)"
228-
TargetUrl: "arc:/$1?hash=$2"
229-
}
230-
CustomSchemes {
231-
Pattern: "arc://(.*)"
232-
TargetUrl: "arc:/$1"
233-
}
234-
}

ydb/library/yql/tests/common/test_framework/yql_utils.py

+17-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import tempfile
1111
import shutil
1212

13+
from google.protobuf import text_format
1314
from collections import namedtuple, defaultdict, OrderedDict
1415
from functools import partial
1516
import codecs
@@ -37,11 +38,6 @@ def get_param(name, default=None):
3738
return yatest.common.get_param(name, os.environ.get(name) or default)
3839

3940

40-
def get_gateway_cfg_suffix():
41-
default_suffix = None
42-
return get_param('gateway_config_suffix', default_suffix) or ''
43-
44-
4541
def do_custom_query_check(res, sql_query):
4642
custom_check = re.search(r"/\* custom check:(.*)\*/", sql_query)
4743
if not custom_check:
@@ -54,6 +50,11 @@ def do_custom_query_check(res, sql_query):
5450
return True
5551

5652

53+
def get_gateway_cfg_suffix():
54+
default_suffix = None
55+
return get_param('gateway_config_suffix', default_suffix) or ''
56+
57+
5758
def get_gateway_cfg_filename():
5859
suffix = get_gateway_cfg_suffix()
5960
if suffix == '':
@@ -62,6 +63,17 @@ def get_gateway_cfg_filename():
6263
return 'gateways-' + suffix + '.conf'
6364

6465

66+
def merge_default_gateway_cfg(cfg_dir, gateway_config):
67+
68+
with open(yql_source_path(os.path.join(cfg_dir, 'gateways.conf'))) as f:
69+
text_format.Merge(f.read(), gateway_config)
70+
71+
suffix = get_gateway_cfg_suffix()
72+
if suffix:
73+
with open(yql_source_path(os.path.join(cfg_dir, 'gateways-' + suffix + '.conf'))) as f:
74+
text_format.Merge(f.read(), gateway_config)
75+
76+
6577
def find_file(path):
6678
arcadia_root = '.'
6779
while '.arcadia.root' not in os.listdir(arcadia_root):

ydb/library/yql/tests/common/test_framework/yqlrun.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,11 @@ def __init__(self, udfs_dir=None, prov='yt', use_sql2yql=False, keep_temp=True,
6161
if gateway_config is not None:
6262
text_format.Merge(gateway_config, self.gateway_config)
6363

64-
if cfg_dir is None:
65-
cfg_dir = 'ydb/library/yql/cfg/tests'
66-
with open(yql_utils.yql_source_path(cfg_dir + '/' + yql_utils.get_gateway_cfg_filename())) as f:
67-
text_format.Merge(f.read(), self.gateway_config)
64+
yql_utils.merge_default_gateway_cfg(cfg_dir or 'ydb/library/yql/cfg/tests', self.gateway_config)
6865

6966
self.fs_config = file_storage_pb2.TFileStorageConfig()
7067

71-
with open(yql_utils.yql_source_path(cfg_dir + '/fs.conf')) as f:
68+
with open(yql_utils.yql_source_path(os.path.join(cfg_dir or 'ydb/library/yql/cfg/tests', 'fs.conf'))) as f:
7269
text_format.Merge(f.read(), self.fs_config)
7370

7471
if fs_config is not None:

0 commit comments

Comments
 (0)