Skip to content

Commit

Permalink
review feedback from cvittal
Browse files Browse the repository at this point in the history
  • Loading branch information
ehigham committed Sep 16, 2024
1 parent 68d1fa3 commit 992de5f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion hail/python/hail/expr/expressions/expression_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def eval_timed(expression):
ir = expression._indices.source.select_globals(**{uid: expression}).index_globals()[uid]._ir

(value, timings) = Env.backend().execute(MakeTuple([ir]), timed=True)
return (value[0], timings)
return value[0], timings


@typecheck(expression=expr_any)
Expand Down
2 changes: 1 addition & 1 deletion hail/src/main/scala/is/hail/backend/ExecuteContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import java.security.SecureRandom
import sourcecode.Enclosing

trait TempFileManager extends AutoCloseable {
def newTmpPath(tmpdir: String, prefix: String, extension: String = ""): String
def newTmpPath(tmpdir: String, prefix: String, extension: String = null): String

Check warning on line 20 in hail/src/main/scala/is/hail/backend/ExecuteContext.scala

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

hail/src/main/scala/is/hail/backend/ExecuteContext.scala#L20

Avoid using null.
}

class OwningTempFileManager(fs: FS) extends TempFileManager {
Expand Down
10 changes: 5 additions & 5 deletions hail/src/main/scala/is/hail/expr/ir/lowering/LoweringPass.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ trait LoweringPass {
val after: IRState
val context: String

final def apply(ctx: ExecuteContext, ir: BaseIR): BaseIR = {
final def apply(cqtx: ExecuteContext, ir: BaseIR): BaseIR = {
ctx.timer.time(context) {
ctx.timer.time("Verify")(before.verify(ir))
val result = ctx.timer.time("Transform")(transform(ctx, ir))
Expand All @@ -39,10 +39,10 @@ trait LoweringPass {
}

case class OptimizePass(_context: String) extends LoweringPass {
val context = s"Optimize: ${_context}"
val before: IRState = AnyIR
val after: IRState = AnyIR
def transform(ctx: ExecuteContext, ir: BaseIR): BaseIR = Optimize(ctx, ir)
override val context = s"Optimize: ${_context}"
override val before: IRState = AnyIR
override val after: IRState = AnyIR
override def transform(ctx: ExecuteContext, ir: BaseIR): BaseIR = Optimize(ctx, ir)
}

case object LowerMatrixToTablePass extends LoweringPass {
Expand Down

0 comments on commit 992de5f

Please sign in to comment.