Skip to content

Commit 0474cb4

Browse files
authored
Replace logical ids with 0 in canonized files as it is done in dq_file (#11683)
1 parent a261a76 commit 0474cb4

File tree

6 files changed

+18
-15
lines changed
  • ydb/library/yql/tests/sql/solomon
    • canondata
      • test.test_solomon-Basic-default.txt_
      • test.test_solomon-Downsampling-default.txt_
      • test.test_solomon-DownsamplingValidSettings-default.txt_
      • test.test_solomon-LabelColumns-default.txt_
      • test.test_solomon-Subquery-default.txt_

6 files changed

+18
-15
lines changed

ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Basic-default.txt_/opt.yql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
(let $4 (StructType '('"kind" $3) '('"labels" (DictType $3 $3)) '('"ts" (DataType 'Datetime)) '('type $3) '('"value" (DataType 'Double))))
66
(let $5 '('"kind" '"labels" '"value" '"ts" 'type))
77
(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"2023-12-08T14:40:39Z" '"2023-12-08T14:45:39Z" '"{}" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15")))
8-
(let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '199948))))
9-
(let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '199975))))
8+
(let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '0))))
9+
(let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '0))))
1010
(let $9 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $8 '"0") '()) '('('type) '('autoref)) '"dq"))
1111
(return (Commit! (Commit! $9 $2) (DataSink '"solomon" '"local_solomon")))
12-
)
12+
)

ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Downsampling-default.txt_/opt.yql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
(let $4 (StructType '('"kind" $3) '('"labels" (DictType $3 $3)) '('"ts" (DataType 'Datetime)) '('type $3) '('"value" (DataType 'Double))))
66
(let $5 '('"kind" '"labels" '"value" '"ts" 'type))
77
(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"2023-12-08T14:40:39Z" '"2023-12-08T14:45:39Z" '"{}" (Bool '"true") '"SUM" '"PREVIOUS" (Uint32 '"25")))
8-
(let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '199972))))
9-
(let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '199999))))
8+
(let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '0))))
9+
(let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '0))))
1010
(let $9 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $8 '"0") '()) '('('type) '('autoref)) '"dq"))
1111
(return (Commit! (Commit! $9 $2) (DataSink '"solomon" '"local_solomon")))
12-
)
12+
)

ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-DownsamplingValidSettings-default.txt_/opt.yql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
(let $4 (StructType '('"kind" $3) '('"labels" (DictType $3 $3)) '('"ts" (DataType 'Datetime)) '('type $3) '('"value" (DataType 'Double))))
66
(let $5 '('"kind" '"labels" '"value" '"ts" 'type))
77
(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"2023-12-08T14:40:39Z" '"2023-12-08T14:45:39Z" '"{}" (Bool '"false") '"SUM" '"PREVIOUS" (Uint32 '"15")))
8-
(let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '199960))))
9-
(let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '199987))))
8+
(let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($10) $10) '('('"_logical_id" '0))))
9+
(let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($11) $11) '('('"_logical_id" '0))))
1010
(let $9 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $8 '"0") '()) '('('type) '('autoref)) '"dq"))
1111
(return (Commit! (Commit! $9 $2) (DataSink '"solomon" '"local_solomon")))
12-
)
12+
)

ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-LabelColumns-default.txt_/opt.yql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
(let $8 '('"kind" '"value" '"ts" 'type))
1010
(let $9 '($3 $5 '"project" $6))
1111
(let $10 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $7 $8 $9 '"2023-12-08T14:40:39Z" '"2023-12-08T14:45:39Z" '"{}" (Bool '"false") '"AVG" '"PREVIOUS" (Uint32 '"15")))
12-
(let $11 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $10)) (lambda '($14) $14) '('('"_logical_id" '199986))))
13-
(let $12 (DqStage '((DqCnUnionAll (TDqOutput $11 '"0"))) (lambda '($15) $15) '('('"_logical_id" '200013))))
12+
(let $11 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $10)) (lambda '($14) $14) '('('"_logical_id" '0))))
13+
(let $12 (DqStage '((DqCnUnionAll (TDqOutput $11 '"0"))) (lambda '($15) $15) '('('"_logical_id" '0))))
1414
(let $13 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $12 '"0") '()) '('('type) '('autoref)) '"dq"))
1515
(return (Commit! (Commit! $13 $2) (DataSink '"solomon" '"local_solomon")))
16-
)
16+
)

ydb/library/yql/tests/sql/solomon/canondata/test.test_solomon-Subquery-default.txt_/opt.yql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
(let $4 (StructType '('"kind" $3) '('"labels" (DictType $3 $3)) '('"ts" (DataType 'Datetime)) '('type $3) '('"value" (DataType 'Double))))
66
(let $5 '('"kind" '"labels" '"value" '"ts" 'type))
77
(let $6 (SoSourceSettings world '"my_project" (SecureParam '"cluster:default_local_solomon") $4 $5 '() '"2023-12-08T14:40:39Z" '"2023-12-08T14:45:39Z" '"{}" (Bool '"true") '"SUM" '"PREVIOUS" (Uint32 '"25")))
8-
(let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($11) $11) '('('"_logical_id" '200295))))
9-
(let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($12) $12) '('('"_logical_id" '200337))))
8+
(let $7 (DqStage '((DqSource (DataSource '"solomon" '"local_solomon") $6)) (lambda '($11) $11) '('('"_logical_id" '0))))
9+
(let $8 (DqStage '((DqCnUnionAll (TDqOutput $7 '"0"))) (lambda '($12) $12) '('('"_logical_id" '0))))
1010
(let $9 '('('type) '('autoref) '('unordered)))
1111
(let $10 (ResPull! $1 $2 (Key) (DqCnResult (TDqOutput $8 '"0") '()) $9 '"dq"))
1212
(return (Commit! (Commit! $10 $2) (DataSink '"solomon" '"local_solomon")))
13-
)
13+
)

ydb/library/yql/tests/sql/solomon/test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ def test(suite, case, cfg, solomon):
8484
assert yqlrun_res.execution_result.exit_code != 0
8585
return [normalize_source_code_path(sanitize_issues(yqlrun_res.std_err))]
8686

87+
with open(yqlrun_res.opt_file, 'w') as f:
88+
f.write(re.sub(r"""("?_logical_id"?) '\d+""", r"""\1 '0""", yqlrun_res.opt).encode('utf-8'))
89+
8790
return [yatest.common.canonical_file(yqlrun_res.results_file, local=True),
8891
yatest.common.canonical_file(yqlrun_res.opt_file, local=True, diff_tool=ASTDIFF_PATH),
8992
yatest.common.canonical_file(yqlrun_res.plan_file, local=True)]

0 commit comments

Comments
 (0)