ydb-sqlglot-plugin 0.2.4__tar.gz → 0.2.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ydb-sqlglot-plugin
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: YDB dialect plugin for sqlglot
5
5
  Author: YDB Team
6
6
  License: Apache-2.0
@@ -53,6 +53,94 @@ result = sqlglot.transpile("$t = (SELECT id FROM users); SELECT * FROM $t AS t",
53
53
 
54
54
  ## What the plugin does
55
55
 
56
+ ### YDB syntax documentation conformance
57
+
58
+ Source index: https://ydb.tech/docs/en/yql/reference/syntax/
59
+
60
+ This is a working checklist for doc-conformance work against YDB syntax
61
+ documentation. A checked item means `tests/unit/test_ydb.py` has focused tests
62
+ derived from that page's snippets, syntax variants, or documented negative
63
+ cases. An unchecked item is a backlog item.
64
+
65
+ - [x] [Lexical structure](https://ydb.tech/docs/en/yql/reference/syntax/lexer) - `test_lexer_doc_*`
66
+ - [x] [Expressions](https://ydb.tech/docs/en/yql/reference/syntax/expressions) - `test_expressions_doc_*`
67
+ - [x] [SELECT](https://ydb.tech/docs/en/yql/reference/syntax/select/) - all tracked SELECT subpages below
68
+ - [x] [Overview](https://ydb.tech/docs/en/yql/reference/syntax/select/) - `test_select_overview_doc_*`
69
+ - [x] [FROM](https://ydb.tech/docs/en/yql/reference/syntax/select/from) - `test_from_doc_snippets`
70
+ - [x] [FROM AS_TABLE](https://ydb.tech/docs/en/yql/reference/syntax/select/from_as_table) - `test_from_as_table_doc_snippet`
71
+ - [x] [FROM SELECT](https://ydb.tech/docs/en/yql/reference/syntax/select/from_select) - `test_from_select_doc_snippets`
72
+ - [x] [FLATTEN](https://ydb.tech/docs/en/yql/reference/syntax/select/flatten) - `test_flatten_*_page_snippet_roundtrip_stable`
73
+ - [x] [GROUP BY](https://ydb.tech/docs/en/yql/reference/syntax/select/group_by) - `test_group_by_doc_*`
74
+ - [x] [JOIN](https://ydb.tech/docs/en/yql/reference/syntax/select/join) - `test_join_doc_*`
75
+ - [x] [WINDOW](https://ydb.tech/docs/en/yql/reference/syntax/select/window) - `test_window_functions`, `test_window_doc_partition_compact_hint`
76
+ - [x] [DISTINCT](https://ydb.tech/docs/en/yql/reference/syntax/select/distinct) - `test_distinct_doc_*`
77
+ - [x] [UNIQUE DISTINCT](https://ydb.tech/docs/en/yql/reference/syntax/select/unique_distinct_hints) - `test_unique_distinct_hints`
78
+ - [x] [UNION](https://ydb.tech/docs/en/yql/reference/syntax/select/union) - `test_union_doc_*`
79
+ - [x] [VIEW secondary_index](https://ydb.tech/docs/en/yql/reference/syntax/select/secondary_index) - `test_secondary_index_doc_*`
80
+ - [x] [VIEW vector_index](https://ydb.tech/docs/en/yql/reference/syntax/select/vector_index) - `test_vector_index_doc_*`
81
+ - [x] [WITH](https://ydb.tech/docs/en/yql/reference/syntax/select/with) - `test_with_doc_*`
82
+ - [x] [WITHOUT](https://ydb.tech/docs/en/yql/reference/syntax/select/without) - `test_without_doc_*`
83
+ - [x] [WHERE](https://ydb.tech/docs/en/yql/reference/syntax/select/where) - `test_where_doc_filter_snippet`
84
+ - [x] [ORDER BY](https://ydb.tech/docs/en/yql/reference/syntax/select/order_by) - `test_order_by_doc_*`
85
+ - [x] [ASSUME ORDER BY](https://ydb.tech/docs/en/yql/reference/syntax/select/assume_order_by) - `test_assume_order_by_doc_*`
86
+ - [x] [LIMIT OFFSET](https://ydb.tech/docs/en/yql/reference/syntax/select/limit_offset) - `test_limit_offset_doc_*`
87
+ - [x] [SAMPLE / TABLESAMPLE](https://ydb.tech/docs/en/yql/reference/syntax/select/sample) - `test_sample_doc_*`
88
+ - [x] [MATCH_RECOGNIZE](https://ydb.tech/docs/en/yql/reference/syntax/select/match_recognize) - `test_match_recognize_doc_*`
89
+ - [ ] [VALUES](https://ydb.tech/docs/en/yql/reference/syntax/values)
90
+ - [x] [CREATE TABLE](https://ydb.tech/docs/en/yql/reference/syntax/create_table/) - `test_create_table_doc_*`, `test_create_table_secondary_index_doc_*`, `test_create_table_family_doc_*`, TTL tests
91
+ - [ ] [DROP TABLE](https://ydb.tech/docs/en/yql/reference/syntax/drop_table)
92
+ - [x] [INSERT](https://ydb.tech/docs/en/yql/reference/syntax/insert_into) - `test_insert_into_doc_snippets`, `test_insert_into_external_file_doc_snippet` (skipped: external sources), pg→ydb DML coverage
93
+ - [ ] [ALTER TABLE](https://ydb.tech/docs/en/yql/reference/syntax/alter_table/)
94
+ - [x] [UPDATE](https://ydb.tech/docs/en/yql/reference/syntax/update) - `test_update_doc_*`, `test_update_on_doc_snippet`
95
+ - [ ] [DELETE](https://ydb.tech/docs/en/yql/reference/syntax/delete)
96
+ - [ ] [REPLACE](https://ydb.tech/docs/en/yql/reference/syntax/replace_into)
97
+ - [x] [UPSERT](https://ydb.tech/docs/en/yql/reference/syntax/upsert_into) - `test_upsert_into_doc_*`
98
+ - [ ] [ACTION](https://ydb.tech/docs/en/yql/reference/syntax/action)
99
+ - [ ] [INTO RESULT](https://ydb.tech/docs/en/yql/reference/syntax/into_result)
100
+ - [ ] [PRAGMA](https://ydb.tech/docs/en/yql/reference/syntax/pragma)
101
+ - [ ] [DECLARE](https://ydb.tech/docs/en/yql/reference/syntax/declare)
102
+ - [ ] [CREATE TOPIC](https://ydb.tech/docs/en/yql/reference/syntax/create-topic)
103
+ - [ ] [ALTER TOPIC](https://ydb.tech/docs/en/yql/reference/syntax/alter-topic)
104
+ - [ ] [DROP TOPIC](https://ydb.tech/docs/en/yql/reference/syntax/drop-topic)
105
+ - [ ] [CREATE ASYNC REPLICATION](https://ydb.tech/docs/en/yql/reference/syntax/create-async-replication)
106
+ - [ ] [ALTER ASYNC REPLICATION](https://ydb.tech/docs/en/yql/reference/syntax/alter-async-replication)
107
+ - [ ] [DROP ASYNC REPLICATION](https://ydb.tech/docs/en/yql/reference/syntax/drop-async-replication)
108
+ - [ ] [CREATE TRANSFER](https://ydb.tech/docs/en/yql/reference/syntax/create-transfer)
109
+ - [ ] [ALTER TRANSFER](https://ydb.tech/docs/en/yql/reference/syntax/alter-transfer)
110
+ - [ ] [DROP TRANSFER](https://ydb.tech/docs/en/yql/reference/syntax/drop-transfer)
111
+ - [ ] [COMMIT](https://ydb.tech/docs/en/yql/reference/syntax/commit)
112
+ - [ ] [CREATE VIEW](https://ydb.tech/docs/en/yql/reference/syntax/create-view)
113
+ - [ ] [ALTER VIEW](https://ydb.tech/docs/en/yql/reference/syntax/alter-view)
114
+ - [ ] [DROP VIEW](https://ydb.tech/docs/en/yql/reference/syntax/drop-view)
115
+ - [ ] [CREATE EXTERNAL DATA SOURCE](https://ydb.tech/docs/en/yql/reference/syntax/create-external-data-source)
116
+ - [ ] [CREATE EXTERNAL TABLE](https://ydb.tech/docs/en/yql/reference/syntax/create-external-table)
117
+ - [ ] [DROP EXTERNAL DATA SOURCE](https://ydb.tech/docs/en/yql/reference/syntax/drop-external-data-source)
118
+ - [ ] [DROP EXTERNAL TABLE](https://ydb.tech/docs/en/yql/reference/syntax/drop-external-table)
119
+ - [ ] [CREATE OBJECT (TYPE SECRET)](https://ydb.tech/docs/en/yql/reference/syntax/create-object-type-secret)
120
+ - [ ] [CREATE OBJECT (TYPE SECRET_ACCESS)](https://ydb.tech/docs/en/yql/reference/syntax/create-object-type-secret-access)
121
+ - [ ] [DROP OBJECT (TYPE SECRET)](https://ydb.tech/docs/en/yql/reference/syntax/drop-object-type-secret)
122
+ - [ ] [DROP OBJECT (TYPE SECRET_ACCESS)](https://ydb.tech/docs/en/yql/reference/syntax/drop-object-type-secret-access)
123
+ - [ ] [UPSERT OBJECT (TYPE SECRET)](https://ydb.tech/docs/en/yql/reference/syntax/upsert-object-type-secret)
124
+ - [ ] [CREATE RESOURCE POOL](https://ydb.tech/docs/en/yql/reference/syntax/create-resource-pool)
125
+ - [ ] [ALTER RESOURCE POOL](https://ydb.tech/docs/en/yql/reference/syntax/alter-resource-pool)
126
+ - [ ] [DROP RESOURCE POOL](https://ydb.tech/docs/en/yql/reference/syntax/drop-resource-pool)
127
+ - [ ] [CREATE RESOURCE POOL CLASSIFIER](https://ydb.tech/docs/en/yql/reference/syntax/create-resource-pool-classifier)
128
+ - [ ] [ALTER RESOURCE POOL CLASSIFIER](https://ydb.tech/docs/en/yql/reference/syntax/alter-resource-pool-classifier)
129
+ - [ ] [DROP RESOURCE POOL CLASSIFIER](https://ydb.tech/docs/en/yql/reference/syntax/drop-resource-pool-classifier)
130
+ - [ ] [CREATE USER](https://ydb.tech/docs/en/yql/reference/syntax/create-user)
131
+ - [ ] [ALTER USER](https://ydb.tech/docs/en/yql/reference/syntax/alter-user)
132
+ - [ ] [DROP USER](https://ydb.tech/docs/en/yql/reference/syntax/drop-user)
133
+ - [ ] [CREATE GROUP](https://ydb.tech/docs/en/yql/reference/syntax/create-group)
134
+ - [ ] [ALTER GROUP](https://ydb.tech/docs/en/yql/reference/syntax/alter-group)
135
+ - [ ] [DROP GROUP](https://ydb.tech/docs/en/yql/reference/syntax/drop-group)
136
+ - [ ] [GRANT](https://ydb.tech/docs/en/yql/reference/syntax/grant)
137
+ - [ ] [REVOKE](https://ydb.tech/docs/en/yql/reference/syntax/revoke)
138
+ - [ ] [Unsupported syntax](https://ydb.tech/docs/en/yql/reference/syntax/unsupported)
139
+
140
+ Unchecked pages may already have incidental parser support. They remain
141
+ unchecked until their specific documentation page has been used as the normative
142
+ source and focused tests have been added or corrected.
143
+
56
144
  ### Any SQL → YDB
57
145
 
58
146
  #### Table names
@@ -26,6 +26,94 @@ result = sqlglot.transpile("$t = (SELECT id FROM users); SELECT * FROM $t AS t",
26
26
 
27
27
  ## What the plugin does
28
28
 
29
+ ### YDB syntax documentation conformance
30
+
31
+ Source index: https://ydb.tech/docs/en/yql/reference/syntax/
32
+
33
+ This is a working checklist for doc-conformance work against YDB syntax
34
+ documentation. A checked item means `tests/unit/test_ydb.py` has focused tests
35
+ derived from that page's snippets, syntax variants, or documented negative
36
+ cases. An unchecked item is a backlog item.
37
+
38
+ - [x] [Lexical structure](https://ydb.tech/docs/en/yql/reference/syntax/lexer) - `test_lexer_doc_*`
39
+ - [x] [Expressions](https://ydb.tech/docs/en/yql/reference/syntax/expressions) - `test_expressions_doc_*`
40
+ - [x] [SELECT](https://ydb.tech/docs/en/yql/reference/syntax/select/) - all tracked SELECT subpages below
41
+ - [x] [Overview](https://ydb.tech/docs/en/yql/reference/syntax/select/) - `test_select_overview_doc_*`
42
+ - [x] [FROM](https://ydb.tech/docs/en/yql/reference/syntax/select/from) - `test_from_doc_snippets`
43
+ - [x] [FROM AS_TABLE](https://ydb.tech/docs/en/yql/reference/syntax/select/from_as_table) - `test_from_as_table_doc_snippet`
44
+ - [x] [FROM SELECT](https://ydb.tech/docs/en/yql/reference/syntax/select/from_select) - `test_from_select_doc_snippets`
45
+ - [x] [FLATTEN](https://ydb.tech/docs/en/yql/reference/syntax/select/flatten) - `test_flatten_*_page_snippet_roundtrip_stable`
46
+ - [x] [GROUP BY](https://ydb.tech/docs/en/yql/reference/syntax/select/group_by) - `test_group_by_doc_*`
47
+ - [x] [JOIN](https://ydb.tech/docs/en/yql/reference/syntax/select/join) - `test_join_doc_*`
48
+ - [x] [WINDOW](https://ydb.tech/docs/en/yql/reference/syntax/select/window) - `test_window_functions`, `test_window_doc_partition_compact_hint`
49
+ - [x] [DISTINCT](https://ydb.tech/docs/en/yql/reference/syntax/select/distinct) - `test_distinct_doc_*`
50
+ - [x] [UNIQUE DISTINCT](https://ydb.tech/docs/en/yql/reference/syntax/select/unique_distinct_hints) - `test_unique_distinct_hints`
51
+ - [x] [UNION](https://ydb.tech/docs/en/yql/reference/syntax/select/union) - `test_union_doc_*`
52
+ - [x] [VIEW secondary_index](https://ydb.tech/docs/en/yql/reference/syntax/select/secondary_index) - `test_secondary_index_doc_*`
53
+ - [x] [VIEW vector_index](https://ydb.tech/docs/en/yql/reference/syntax/select/vector_index) - `test_vector_index_doc_*`
54
+ - [x] [WITH](https://ydb.tech/docs/en/yql/reference/syntax/select/with) - `test_with_doc_*`
55
+ - [x] [WITHOUT](https://ydb.tech/docs/en/yql/reference/syntax/select/without) - `test_without_doc_*`
56
+ - [x] [WHERE](https://ydb.tech/docs/en/yql/reference/syntax/select/where) - `test_where_doc_filter_snippet`
57
+ - [x] [ORDER BY](https://ydb.tech/docs/en/yql/reference/syntax/select/order_by) - `test_order_by_doc_*`
58
+ - [x] [ASSUME ORDER BY](https://ydb.tech/docs/en/yql/reference/syntax/select/assume_order_by) - `test_assume_order_by_doc_*`
59
+ - [x] [LIMIT OFFSET](https://ydb.tech/docs/en/yql/reference/syntax/select/limit_offset) - `test_limit_offset_doc_*`
60
+ - [x] [SAMPLE / TABLESAMPLE](https://ydb.tech/docs/en/yql/reference/syntax/select/sample) - `test_sample_doc_*`
61
+ - [x] [MATCH_RECOGNIZE](https://ydb.tech/docs/en/yql/reference/syntax/select/match_recognize) - `test_match_recognize_doc_*`
62
+ - [ ] [VALUES](https://ydb.tech/docs/en/yql/reference/syntax/values)
63
+ - [x] [CREATE TABLE](https://ydb.tech/docs/en/yql/reference/syntax/create_table/) - `test_create_table_doc_*`, `test_create_table_secondary_index_doc_*`, `test_create_table_family_doc_*`, TTL tests
64
+ - [ ] [DROP TABLE](https://ydb.tech/docs/en/yql/reference/syntax/drop_table)
65
+ - [x] [INSERT](https://ydb.tech/docs/en/yql/reference/syntax/insert_into) - `test_insert_into_doc_snippets`, `test_insert_into_external_file_doc_snippet` (skipped: external sources), pg→ydb DML coverage
66
+ - [ ] [ALTER TABLE](https://ydb.tech/docs/en/yql/reference/syntax/alter_table/)
67
+ - [x] [UPDATE](https://ydb.tech/docs/en/yql/reference/syntax/update) - `test_update_doc_*`, `test_update_on_doc_snippet`
68
+ - [ ] [DELETE](https://ydb.tech/docs/en/yql/reference/syntax/delete)
69
+ - [ ] [REPLACE](https://ydb.tech/docs/en/yql/reference/syntax/replace_into)
70
+ - [x] [UPSERT](https://ydb.tech/docs/en/yql/reference/syntax/upsert_into) - `test_upsert_into_doc_*`
71
+ - [ ] [ACTION](https://ydb.tech/docs/en/yql/reference/syntax/action)
72
+ - [ ] [INTO RESULT](https://ydb.tech/docs/en/yql/reference/syntax/into_result)
73
+ - [ ] [PRAGMA](https://ydb.tech/docs/en/yql/reference/syntax/pragma)
74
+ - [ ] [DECLARE](https://ydb.tech/docs/en/yql/reference/syntax/declare)
75
+ - [ ] [CREATE TOPIC](https://ydb.tech/docs/en/yql/reference/syntax/create-topic)
76
+ - [ ] [ALTER TOPIC](https://ydb.tech/docs/en/yql/reference/syntax/alter-topic)
77
+ - [ ] [DROP TOPIC](https://ydb.tech/docs/en/yql/reference/syntax/drop-topic)
78
+ - [ ] [CREATE ASYNC REPLICATION](https://ydb.tech/docs/en/yql/reference/syntax/create-async-replication)
79
+ - [ ] [ALTER ASYNC REPLICATION](https://ydb.tech/docs/en/yql/reference/syntax/alter-async-replication)
80
+ - [ ] [DROP ASYNC REPLICATION](https://ydb.tech/docs/en/yql/reference/syntax/drop-async-replication)
81
+ - [ ] [CREATE TRANSFER](https://ydb.tech/docs/en/yql/reference/syntax/create-transfer)
82
+ - [ ] [ALTER TRANSFER](https://ydb.tech/docs/en/yql/reference/syntax/alter-transfer)
83
+ - [ ] [DROP TRANSFER](https://ydb.tech/docs/en/yql/reference/syntax/drop-transfer)
84
+ - [ ] [COMMIT](https://ydb.tech/docs/en/yql/reference/syntax/commit)
85
+ - [ ] [CREATE VIEW](https://ydb.tech/docs/en/yql/reference/syntax/create-view)
86
+ - [ ] [ALTER VIEW](https://ydb.tech/docs/en/yql/reference/syntax/alter-view)
87
+ - [ ] [DROP VIEW](https://ydb.tech/docs/en/yql/reference/syntax/drop-view)
88
+ - [ ] [CREATE EXTERNAL DATA SOURCE](https://ydb.tech/docs/en/yql/reference/syntax/create-external-data-source)
89
+ - [ ] [CREATE EXTERNAL TABLE](https://ydb.tech/docs/en/yql/reference/syntax/create-external-table)
90
+ - [ ] [DROP EXTERNAL DATA SOURCE](https://ydb.tech/docs/en/yql/reference/syntax/drop-external-data-source)
91
+ - [ ] [DROP EXTERNAL TABLE](https://ydb.tech/docs/en/yql/reference/syntax/drop-external-table)
92
+ - [ ] [CREATE OBJECT (TYPE SECRET)](https://ydb.tech/docs/en/yql/reference/syntax/create-object-type-secret)
93
+ - [ ] [CREATE OBJECT (TYPE SECRET_ACCESS)](https://ydb.tech/docs/en/yql/reference/syntax/create-object-type-secret-access)
94
+ - [ ] [DROP OBJECT (TYPE SECRET)](https://ydb.tech/docs/en/yql/reference/syntax/drop-object-type-secret)
95
+ - [ ] [DROP OBJECT (TYPE SECRET_ACCESS)](https://ydb.tech/docs/en/yql/reference/syntax/drop-object-type-secret-access)
96
+ - [ ] [UPSERT OBJECT (TYPE SECRET)](https://ydb.tech/docs/en/yql/reference/syntax/upsert-object-type-secret)
97
+ - [ ] [CREATE RESOURCE POOL](https://ydb.tech/docs/en/yql/reference/syntax/create-resource-pool)
98
+ - [ ] [ALTER RESOURCE POOL](https://ydb.tech/docs/en/yql/reference/syntax/alter-resource-pool)
99
+ - [ ] [DROP RESOURCE POOL](https://ydb.tech/docs/en/yql/reference/syntax/drop-resource-pool)
100
+ - [ ] [CREATE RESOURCE POOL CLASSIFIER](https://ydb.tech/docs/en/yql/reference/syntax/create-resource-pool-classifier)
101
+ - [ ] [ALTER RESOURCE POOL CLASSIFIER](https://ydb.tech/docs/en/yql/reference/syntax/alter-resource-pool-classifier)
102
+ - [ ] [DROP RESOURCE POOL CLASSIFIER](https://ydb.tech/docs/en/yql/reference/syntax/drop-resource-pool-classifier)
103
+ - [ ] [CREATE USER](https://ydb.tech/docs/en/yql/reference/syntax/create-user)
104
+ - [ ] [ALTER USER](https://ydb.tech/docs/en/yql/reference/syntax/alter-user)
105
+ - [ ] [DROP USER](https://ydb.tech/docs/en/yql/reference/syntax/drop-user)
106
+ - [ ] [CREATE GROUP](https://ydb.tech/docs/en/yql/reference/syntax/create-group)
107
+ - [ ] [ALTER GROUP](https://ydb.tech/docs/en/yql/reference/syntax/alter-group)
108
+ - [ ] [DROP GROUP](https://ydb.tech/docs/en/yql/reference/syntax/drop-group)
109
+ - [ ] [GRANT](https://ydb.tech/docs/en/yql/reference/syntax/grant)
110
+ - [ ] [REVOKE](https://ydb.tech/docs/en/yql/reference/syntax/revoke)
111
+ - [ ] [Unsupported syntax](https://ydb.tech/docs/en/yql/reference/syntax/unsupported)
112
+
113
+ Unchecked pages may already have incidental parser support. They remain
114
+ unchecked until their specific documentation page has been used as the normative
115
+ source and focused tests have been added or corrected.
116
+
29
117
  ### Any SQL → YDB
30
118
 
31
119
  #### Table names
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ydb-sqlglot-plugin"
7
- version = "0.2.4" # AUTOVERSION
7
+ version = "0.2.5" # AUTOVERSION
8
8
  description = "YDB dialect plugin for sqlglot"
9
9
  readme = "README.md"
10
10
  license = {text = "Apache-2.0"}
@@ -0,0 +1 @@
1
+ VERSION = "0.2.5"