Executing Spark UDF Services
Operations in this section are required only when OmniOperator UDFs are used. The OmniOperator UDF plugin supports only simple UDFs. If OmniOperator UDFs are not available, the plugin will be rolled back to the native Spark.
For details, see Executing Spark Engine Services. You only need to add the following parameters to the commands of starting the Spark-SQL CLI of SparkExtension:
- Add /opt/omni-operator/lib/boostkit-omniop-udf-1.1.0-aarch64.jar to the end of the spark.driver.extraClassPath parameter:
--conf spark.driver.extraClassPath=/opt/omni-operator/lib/boostkit-omniop-spark-3.1.1-1.1.0-aarch64.jar:/opt/omni-operator/lib/boostkit-omniop-bindings-1.1.0-aarch64.jar:/opt/omni-operator/lib/boostkit-omniop-udf-1.1.0-aarch64.jar:/opt/omni-operator/lib/dependencies/*
- Add /opt/omni-operator/lib/boostkit-omniop-udf-1.1.0-aarch64.jar to the end of the spark.executor.extraClassPath parameter:
--conf spark.executor.extraClassPath=/opt/omni-operator/lib/boostkit-omniop-spark-3.1.1-1.1.0-aarch64.jar:/opt/omni-operator/lib/boostkit-omniop-bindings-1.1.0-aarch64.jar:/opt/omni-operator/lib/boostkit-omniop-udf-1.1.0-aarch64.jar:/opt/omni-operator/lib/dependencies/*
- Add the --jars /opt/omni-operator/lib/boostkit-omniop-udf-1.1.0-aarch64.jar parameter:
--jars /opt/omni-operator/lib/boostkit-omniop-udf-1.1.0-aarch64.jar
For details about how to execute SQL statements, view the execution plans, and compare results, see Executing Spark Engine Services.
Parent topic: Using OmniOperator on the Spark Engine