MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / desc

Method desc

src/compute-client/src/logging.rs:210–405  ·  view source on GitHub ↗

Relation schemas for the logs. This types need to agree with the values that are produced in `logging::compute::construct` and with the description in `catalog/src/builtin/mz_introspection.rs`.

(&self)

Source from the content-addressed store, hash-verified

208 /// in `logging::compute::construct` and with the description in
209 /// `catalog/src/builtin/mz_introspection.rs`.
210 pub fn desc(&self) -> RelationDesc {
211 match self {
212 LogVariant::Timely(TimelyLog::Operates) => RelationDesc::builder()
213 .with_column("id", SqlScalarType::UInt64.nullable(false))
214 .with_column("worker_id", SqlScalarType::UInt64.nullable(false))
215 .with_column("name", SqlScalarType::String.nullable(false))
216 .with_key(vec![0, 1])
217 .finish(),
218
219 LogVariant::Timely(TimelyLog::Channels) => RelationDesc::builder()
220 .with_column("id", SqlScalarType::UInt64.nullable(false))
221 .with_column("worker_id", SqlScalarType::UInt64.nullable(false))
222 .with_column("from_index", SqlScalarType::UInt64.nullable(false))
223 .with_column("from_port", SqlScalarType::UInt64.nullable(false))
224 .with_column("to_index", SqlScalarType::UInt64.nullable(false))
225 .with_column("to_port", SqlScalarType::UInt64.nullable(false))
226 .with_column("type", SqlScalarType::String.nullable(false))
227 .with_key(vec![0, 1])
228 .finish(),
229
230 LogVariant::Timely(TimelyLog::Elapsed) => RelationDesc::builder()
231 .with_column("id", SqlScalarType::UInt64.nullable(false))
232 .with_column("worker_id", SqlScalarType::UInt64.nullable(false))
233 .finish(),
234
235 LogVariant::Timely(TimelyLog::Histogram) => RelationDesc::builder()
236 .with_column("id", SqlScalarType::UInt64.nullable(false))
237 .with_column("worker_id", SqlScalarType::UInt64.nullable(false))
238 .with_column("duration_ns", SqlScalarType::UInt64.nullable(false))
239 .finish(),
240
241 LogVariant::Timely(TimelyLog::Addresses) => RelationDesc::builder()
242 .with_column("id", SqlScalarType::UInt64.nullable(false))
243 .with_column("worker_id", SqlScalarType::UInt64.nullable(false))
244 .with_column(
245 "address",
246 SqlScalarType::List {
247 element_type: Box::new(SqlScalarType::UInt64),
248 custom_id: None,
249 }
250 .nullable(false),
251 )
252 .with_key(vec![0, 1])
253 .finish(),
254
255 LogVariant::Timely(TimelyLog::Parks) => RelationDesc::builder()
256 .with_column("worker_id", SqlScalarType::UInt64.nullable(false))
257 .with_column("slept_for_ns", SqlScalarType::UInt64.nullable(false))
258 .with_column("requested_ns", SqlScalarType::UInt64.nullable(false))
259 .finish(),
260
261 LogVariant::Timely(TimelyLog::BatchesReceived) => RelationDesc::builder()
262 .with_column("channel_id", SqlScalarType::UInt64.nullable(false))
263 .with_column("from_worker_id", SqlScalarType::UInt64.nullable(false))
264 .with_column("to_worker_id", SqlScalarType::UInt64.nullable(false))
265 .finish(),
266
267 LogVariant::Timely(TimelyLog::BatchesSent) => RelationDesc::builder()

Callers 7

index_byMethod · 0.45
fingerprintMethod · 0.45
relation_descMethod · 0.45
make_mz_indexesFunction · 0.45
generate_viewsFunction · 0.45
newMethod · 0.45

Calls 4

with_keyMethod · 0.80
with_columnMethod · 0.80
finishMethod · 0.45
nullableMethod · 0.45

Tested by 1