表达式执行工具方法

 

 

/**
  * Created by liuguangxin on 2018/4/26.
  *
  */
object ExecutionUtils {

  def execute(command: String, maps: util.Map[String, Object]): DataFrame = {
    val jexlEngine = new JexlEngine()
    val expression = jexlEngine.createExpression(command)
    val jc = new MapContext(maps)
    expression.evaluate(jc).asInstanceOf[DataFrame]
  }

}

  

posted @ 2018-07-23 14:16  bf378  阅读(114)  评论(0编辑  收藏  举报