From 301185c65024cf428487ab5cbae8caefae90db8e Mon Sep 17 00:00:00 2001 From: liangbowen Date: Tue, 7 Feb 2023 12:27:45 +0800 Subject: [PATCH] [KYUUBI #4256] [DOCS] Add PYTHON option to `kyuubi.operation.language` config ### _Why are the changes needed?_ - as pyspark is supported in #3780, exposing PYTHON option for `kyuubi.operation.language` as an experimental feature ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4256 from bowenliang123/doc-language-python. Closes #4256 d10c0281 [liangbowen] update description d05cedda [liangbowen] add PYTHON option in kyuubi.operation.language Authored-by: liangbowen Signed-off-by: liangbowen --- docs/deployment/settings.md | 2 +- .../main/scala/org/apache/kyuubi/config/KyuubiConf.scala | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/deployment/settings.md b/docs/deployment/settings.md index 9cd8a681d..7391f4241 100644 --- a/docs/deployment/settings.md +++ b/docs/deployment/settings.md @@ -433,7 +433,7 @@ You can configure the Kyuubi properties in `$KYUUBI_HOME/conf/kyuubi-defaults.co |-----------------------------------------|---------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|-------| | kyuubi.operation.idle.timeout | PT3H | Operation will be closed when it's not accessed for this duration of time | duration | 1.0.0 | | kyuubi.operation.interrupt.on.cancel | true | When true, all running tasks will be interrupted if one cancels a query. When false, all running tasks will remain until finished. | boolean | 1.2.0 | -| kyuubi.operation.language | SQL | Choose a programing language for the following inputs
  • SQL: (Default) Run all following statements as SQL queries.
  • SCALA: Run all following input a scala codes
| string | 1.5.0 | +| kyuubi.operation.language | SQL | Choose a programing language for the following inputs
  • SQL: (Default) Run all following statements as SQL queries.
  • SCALA: Run all following input as scala codes
  • PYTHON: (Experimental) Run all following input as Python codes with Spark engine
| string | 1.5.0 | | kyuubi.operation.log.dir.root | server_operation_logs | Root directory for query operation log at server-side. | string | 1.4.0 | | kyuubi.operation.plan.only.excludes | ResetCommand,SetCommand,SetNamespaceCommand,UseStatement,SetCatalogAndNamespace | Comma-separated list of query plan names, in the form of simple class names, i.e, for `SET abc=xyz`, the value will be `SetCommand`. For those auxiliary plans, such as `switch databases`, `set properties`, or `create temporary view` etc., which are used for setup evaluating environments for analyzing actual queries, we can use this config to exclude them and let them take effect. See also kyuubi.operation.plan.only.mode. | seq | 1.5.0 | | kyuubi.operation.plan.only.mode | none | Configures the statement performed mode, The value can be 'parse', 'analyze', 'optimize', 'optimize_with_stats', 'physical', 'execution', or 'none', when it is 'none', indicate to the statement will be fully executed, otherwise only way without executing the query. different engines currently support different modes, the Spark engine supports all modes, and the Flink engine supports 'parse', 'physical', and 'execution', other engines do not support planOnly currently. | string | 1.4.0 | diff --git a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala index e4c48218a..75f7efedc 100644 --- a/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala +++ b/kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala @@ -2160,8 +2160,12 @@ object KyuubiConf { val OPERATION_LANGUAGE: ConfigEntry[String] = buildConf("kyuubi.operation.language") .doc("Choose a programing language for the following inputs" + - "
  • SQL: (Default) Run all following statements as SQL queries.
  • " + - "
  • SCALA: Run all following input a scala codes
") + "
    " + + "
  • SQL: (Default) Run all following statements as SQL queries.
  • " + + "
  • SCALA: Run all following input as scala codes
  • " + + "
  • PYTHON: (Experimental) Run all following input as Python codes with Spark engine" + + "
  • " + + "
") .version("1.5.0") .stringConf .transform(_.toUpperCase(Locale.ROOT))