Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yliuuuu committed Jan 23, 2024
1 parent 20c4f78 commit dfe25e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public interface PartiQLEngine {

public fun prepare(plan: PartiQLPlan, session: Session): PartiQLStatement<*>

// TODO: Pass session variable during statement execution once we finalize data structure for session.
public fun execute(statement: PartiQLStatement<*>): PartiQLResult

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ internal class Compiler(
return ExprPathIndex(root, index)
}

@OptIn(PartiQLFunctionExperimental::class, PartiQLValueExperimental::class)
@OptIn(PartiQLFunctionExperimental::class)
override fun visitRexOpCallStatic(node: Rex.Op.Call.Static, ctx: Unit): Operator {
val fn = node.fn.signature
val args = node.args.map { visitRex(it, ctx) }
Expand All @@ -151,15 +151,10 @@ internal class Compiler(
}

override fun visitRexOpCallDynamic(node: Rex.Op.Call.Dynamic, ctx: Unit): Operator {
val fn = node.candidates
fn.forEach {
println(it.fn.signature)
}
error("call dynamic not yet implemented")
}

// REL

override fun visitRel(node: Rel, ctx: Unit): Operator.Relation {
return super.visitRelOp(node.op, ctx) as Operator.Relation
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ internal class Env(
}
}
// TODO: Verify if this is the correct behavior
// This is to temporarily unblock the path access on any type.
// Consider tbl : <<{'a' : 1, 'b': 2}>>,
// We now infer the tbl having PartiQLValueType of Bag, which is then converted to StaticType BAG(ANY).
if (rootType is AnyType) {
val match = ResolvedVar.Local(StaticType.ANY, ordinal, rootType, listOf(pathPrefix) + path.steps)
matches.add(match)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ abstract class ConformanceTestBase<T, V> {
abstract val runner: TestRunner<T, V>

// Tests the eval tests with the Kotlin implementation
// Unit is second.
// This is not a performance test. This is for stop long-running tests during development process in eval engine.
// This number can be smaller, but to account for the cold start time and fluctuation of GitHub runner,
// I decided to make this number a bit larger than needed.
@Timeout(value = 100, threadMode = Timeout.ThreadMode.SEPARATE_THREAD)
@ParameterizedTest(name = "{arguments}")
@ArgumentsSource(TestProvider.Eval::class)
Expand Down

0 comments on commit dfe25e3

Please sign in to comment.