forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 4
/
catalog.proto
241 lines (209 loc) · 5.7 KB
/
catalog.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = 'proto3';
package spark.connect;
import "spark/connect/common.proto";
import "spark/connect/types.proto";
option java_multiple_files = true;
option java_package = "org.apache.spark.connect.proto";
option go_package = "internal/generated";
// Catalog messages are marked as unstable.
message Catalog {
oneof cat_type {
CurrentDatabase current_database = 1;
SetCurrentDatabase set_current_database = 2;
ListDatabases list_databases = 3;
ListTables list_tables = 4;
ListFunctions list_functions = 5;
ListColumns list_columns = 6;
GetDatabase get_database = 7;
GetTable get_table = 8;
GetFunction get_function = 9;
DatabaseExists database_exists = 10;
TableExists table_exists = 11;
FunctionExists function_exists = 12;
CreateExternalTable create_external_table = 13;
CreateTable create_table = 14;
DropTempView drop_temp_view = 15;
DropGlobalTempView drop_global_temp_view = 16;
RecoverPartitions recover_partitions = 17;
IsCached is_cached = 18;
CacheTable cache_table = 19;
UncacheTable uncache_table = 20;
ClearCache clear_cache = 21;
RefreshTable refresh_table = 22;
RefreshByPath refresh_by_path = 23;
CurrentCatalog current_catalog = 24;
SetCurrentCatalog set_current_catalog = 25;
ListCatalogs list_catalogs = 26;
}
}
// See `spark.catalog.currentDatabase`
message CurrentDatabase { }
// See `spark.catalog.setCurrentDatabase`
message SetCurrentDatabase {
// (Required)
string db_name = 1;
}
// See `spark.catalog.listDatabases`
message ListDatabases {
// (Optional) The pattern that the database name needs to match
optional string pattern = 1;
}
// See `spark.catalog.listTables`
message ListTables {
// (Optional)
optional string db_name = 1;
// (Optional) The pattern that the table name needs to match
optional string pattern = 2;
}
// See `spark.catalog.listFunctions`
message ListFunctions {
// (Optional)
optional string db_name = 1;
}
// See `spark.catalog.listColumns`
message ListColumns {
// (Required)
string table_name = 1;
// (Optional)
optional string db_name = 2;
}
// See `spark.catalog.getDatabase`
message GetDatabase {
// (Required)
string db_name = 1;
}
// See `spark.catalog.getTable`
message GetTable {
// (Required)
string table_name = 1;
// (Optional)
optional string db_name = 2;
}
// See `spark.catalog.getFunction`
message GetFunction {
// (Required)
string function_name = 1;
// (Optional)
optional string db_name = 2;
}
// See `spark.catalog.databaseExists`
message DatabaseExists {
// (Required)
string db_name = 1;
}
// See `spark.catalog.tableExists`
message TableExists {
// (Required)
string table_name = 1;
// (Optional)
optional string db_name = 2;
}
// See `spark.catalog.functionExists`
message FunctionExists {
// (Required)
string function_name = 1;
// (Optional)
optional string db_name = 2;
}
// See `spark.catalog.createExternalTable`
message CreateExternalTable {
// (Required)
string table_name = 1;
// (Optional)
optional string path = 2;
// (Optional)
optional string source = 3;
// (Optional)
optional DataType schema = 4;
// Options could be empty for valid data source format.
// The map key is case insensitive.
map<string, string> options = 5;
}
// See `spark.catalog.createTable`
message CreateTable {
// (Required)
string table_name = 1;
// (Optional)
optional string path = 2;
// (Optional)
optional string source = 3;
// (Optional)
optional string description = 4;
// (Optional)
optional DataType schema = 5;
// Options could be empty for valid data source format.
// The map key is case insensitive.
map<string, string> options = 6;
}
// See `spark.catalog.dropTempView`
message DropTempView {
// (Required)
string view_name = 1;
}
// See `spark.catalog.dropGlobalTempView`
message DropGlobalTempView {
// (Required)
string view_name = 1;
}
// See `spark.catalog.recoverPartitions`
message RecoverPartitions {
// (Required)
string table_name = 1;
}
// See `spark.catalog.isCached`
message IsCached {
// (Required)
string table_name = 1;
}
// See `spark.catalog.cacheTable`
message CacheTable {
// (Required)
string table_name = 1;
// (Optional)
optional StorageLevel storage_level = 2;
}
// See `spark.catalog.uncacheTable`
message UncacheTable {
// (Required)
string table_name = 1;
}
// See `spark.catalog.clearCache`
message ClearCache { }
// See `spark.catalog.refreshTable`
message RefreshTable {
// (Required)
string table_name = 1;
}
// See `spark.catalog.refreshByPath`
message RefreshByPath {
// (Required)
string path = 1;
}
// See `spark.catalog.currentCatalog`
message CurrentCatalog { }
// See `spark.catalog.setCurrentCatalog`
message SetCurrentCatalog {
// (Required)
string catalog_name = 1;
}
// See `spark.catalog.listCatalogs`
message ListCatalogs {
// (Optional) The pattern that the catalog name needs to match
optional string pattern = 1;
}