Skip to content

Commit

Permalink
Removes development test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnedquinn committed Apr 16, 2024
1 parent b5a7955 commit 2e82c38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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."))
}
Expand Down

0 comments on commit 2e82c38

Please sign in to comment.