Skip to content

Commit

Permalink
assert isRealizable in executeLiteral, not execute
Browse files Browse the repository at this point in the history
  • Loading branch information
ehigham committed Oct 8, 2024
1 parent 3c702c0 commit 8fb6e01
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ class LocalBackend(val tmpdir: String) extends Backend with BackendWithCodeCache
ctx.time {
TypeCheck(ctx, ir)
Validate(ir)
assert(ir.typ.isRealizable)
val queryID = Backend.nextID()
log.info(s"starting execution of query $queryID of initial size ${IRSize(ir)}")
ctx.irMetadata.semhash = SemanticHash(ctx)(ir)
Expand All @@ -194,6 +193,7 @@ class LocalBackend(val tmpdir: String) extends Backend with BackendWithCodeCache
def executeLiteral(irStr: String): Int =
withExecuteContext { ctx =>
val ir = IRParser.parse_value_ir(irStr, IRParserEnvironment(ctx, persistedIR.toMap))
assert(ir.typ.isRealizable)
execute(ctx, ir) match {
case Left(_) => throw new HailException("Can't create literal")
case Right((pt, addr)) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ class ServiceBackend(
ctx.time {
TypeCheck(ctx, ir)
Validate(ir)
assert(ir.typ.isRealizable)
val queryID = Backend.nextID()
log.info(s"starting execution of query $queryID of initial size ${IRSize(ir)}")
ctx.irMetadata.semhash = SemanticHash(ctx)(ir)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ class SparkBackend(
ctx.time {
TypeCheck(ctx, ir)
Validate(ir)
assert(ir.typ.isRealizable)
ctx.irMetadata.semhash = SemanticHash(ctx)(ir)
try {
val lowerTable = getFlag("lower") != null
Expand All @@ -558,6 +557,7 @@ class SparkBackend(
def executeLiteral(irStr: String): Int =
withExecuteContext { ctx =>
val ir = IRParser.parse_value_ir(irStr, IRParserEnvironment(ctx, persistedIR.toMap))
assert(ir.typ.isRealizable)
execute(ctx, ir) match {
case Left(_) => throw new HailException("Can't create literal")
case Right((pt, addr)) =>
Expand Down

0 comments on commit 8fb6e01

Please sign in to comment.