From 2e82c380f8cb8492867bfda437dc9031a3385a6e Mon Sep 17 00:00:00 2001 From: John Ed Quinn Date: Tue, 16 Apr 2024 09:53:21 -0700 Subject: [PATCH] Removes development test --- .../eval/internal/PartiQLEngineDefaultTest.kt | 39 ------------------- .../planner/internal/typer/PlanTyper.kt | 6 +-- 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/partiql-eval/src/test/kotlin/org/partiql/eval/internal/PartiQLEngineDefaultTest.kt b/partiql-eval/src/test/kotlin/org/partiql/eval/internal/PartiQLEngineDefaultTest.kt index 2a00011383..fb9d0a7cc9 100644 --- a/partiql-eval/src/test/kotlin/org/partiql/eval/internal/PartiQLEngineDefaultTest.kt +++ b/partiql-eval/src/test/kotlin/org/partiql/eval/internal/PartiQLEngineDefaultTest.kt @@ -69,45 +69,6 @@ class PartiQLEngineDefaultTest { @Execution(ExecutionMode.CONCURRENT) fun globalsTests(tc: SuccessTestCase) = tc.assert() - @Test - fun singleTest() { - val tc = SuccessTestCase( - input = """ - SELECT * FROM << 1 >> OUTER UNION << 'A' >> - """.trimIndent(), - expected = bagValue( - structValue( - "orderName" to stringValue("foo") - ), - structValue( - "orderName" to stringValue("bar"), - "customerName" to stringValue("Helen") - ), - ), - globals = listOf( - SuccessTestCase.Global( - name = "customers", - value = """ - [{id:1, name: "Mary"}, - {id:2, name: "Helen"}, - {id:1, name: "John"} - ] - """ - ), - SuccessTestCase.Global( - name = "orders", - value = """ - [{custId:1, name: "foo"}, - {custId:2, name: "bar"} - ] - """ - ), - ), - mode = PartiQLEngine.Mode.STRICT - ) - tc.assert() - } - companion object { @JvmStatic diff --git a/partiql-planner/src/main/kotlin/org/partiql/planner/internal/typer/PlanTyper.kt b/partiql-planner/src/main/kotlin/org/partiql/planner/internal/typer/PlanTyper.kt index cacca24f66..10a989d052 100644 --- a/partiql-planner/src/main/kotlin/org/partiql/planner/internal/typer/PlanTyper.kt +++ b/partiql-planner/src/main/kotlin/org/partiql/planner/internal/typer/PlanTyper.kt @@ -233,6 +233,9 @@ internal class PlanTyper( return rel(type, op) } + // TODO: [RFC-0007](https://github.com/partiql/partiql-lang/blob/main/RFCs/0007-rfc-bag-operators.md) + // states that the types must be "comparable". The below code ONLY makes sure that types need to be + // the same. In the future, we need to add support for checking comparable types. override fun visitRelOpSet(node: Rel.Op.Set, ctx: Rel.Type?): Rel { val lhs = visitRel(node.lhs, node.lhs.type) val rhs = visitRel(node.rhs, node.rhs.type) @@ -246,9 +249,6 @@ internal class PlanTyper( for (i in 0..lhs.type.schema.lastIndex) { val lhsBindingType = lhs.type.schema[i].type val rhsBindingType = rhs.type.schema[i].type - // TODO: [RFC-0007](https://github.com/partiql/partiql-lang/blob/main/RFCs/0007-rfc-bag-operators.md) - // states that the types must be "comparable". The below code ONLY makes sure that types need to be - // the same. In the future, we need to add support for checking comparable types. if (lhsBindingType != rhsBindingType) { return Rel(Rel.Type(emptyList(), emptySet()), Rel.Op.Err("LHS and RHS of SET OP do not have the same type.")) }