From 2358257c1080b7ce78270535f82f0b960d48261a Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Mon, 6 Jun 2022 16:21:21 +0200 Subject: refactor(trace/api): Introduce type system for trace API This change updates the trace API by introducing a limited type system for the table columns. Previously, the table columns could have any possible type representable by the JVM. With this change, we limit the available types to a small type system. --- .../src/main/kotlin/org/opendc/trace/internal/TableImpl.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/internal') diff --git a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/internal/TableImpl.kt b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/internal/TableImpl.kt index b848e19a..1e1bf676 100644 --- a/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/internal/TableImpl.kt +++ b/opendc-trace/opendc-trace-api/src/main/kotlin/org/opendc/trace/internal/TableImpl.kt @@ -37,13 +37,10 @@ internal class TableImpl(val trace: TraceImpl, override val name: String) : Tabl */ private val details = trace.format.getDetails(trace.path, name) - override val columns: List> + override val columns: List get() = details.columns - override val partitionKeys: List> - get() = details.partitionKeys - - override fun newReader(projection: List>?): TableReader { + override fun newReader(projection: List?): TableReader { return trace.format.newReader(trace.path, name, projection) } -- cgit v1.2.3