表达式执行工具方法

/**
  * 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]
  }

}

  

原文地址:https://www.cnblogs.com/leodaxin/p/9354416.html