
ru.napalabs.spark.hscan.implicits.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spark-hscan_2.11 Show documentation
Show all versions of spark-hscan_2.11 Show documentation
hyperscan wrapper for spark to allow matching large numbers (up to tens of thousands) of regular expressions
The newest version!
package ru.napalabs.spark.hscan
import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.catalyst.FunctionIdentifier
import org.apache.spark.sql.catalyst.expressions.Expression
import ru.napalabs.spark.hscan.funcs.HyperscanLike
object implicits extends Serializable {
implicit class SessionImplicits(spark: SparkSession) {
def registerHyperscanFuncs() = {
spark.sessionState.functionRegistry
.registerFunction(FunctionIdentifier("hlike"),
(expressions: Seq[Expression]) => {
HyperscanLike(expressions(0), expressions(1))
}
)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy