You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2024/09/14 07:07:28 UTC
(kylin) branch doc5.0 updated: Refine the content of Query
This is an automated email from the ASF dual-hosted git repository.
liyang pushed a commit to branch doc5.0
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/doc5.0 by this push:
new 515862fbd9 Refine the content of Query
515862fbd9 is described below
commit 515862fbd9f7f69d1189a9df616fb0b4da51003f
Author: Pengfei Zhan <de...@gmail.com>
AuthorDate: Fri Sep 13 09:48:00 2024 +0800
Refine the content of Query
---
website/docs/configuration/config.md | 192 +++++++++++++++++++
website/docs/configuration/configuration.md | 191 -------------------
website/docs/configuration/intro.md | 2 +-
website/docs/datasource/import_hive.md | 4 +-
website/docs/internaltable/query_internal_table.md | 2 +-
.../auto_modeling/basic_concept_actions.md | 2 +-
.../modeling/auto_modeling/data_modeling_by_SQL.md | 2 +-
.../docs/modeling/model_design/computed_column.md | 2 +-
website/docs/modeling/real-time/prerequisite.md | 4 +-
website/docs/modeling/real-time/real-time.md | 2 +-
website/docs/operations/job-monitoring/intro.md | 2 +-
website/docs/query/{insight => }/async_query.md | 8 +-
website/docs/query/data_type.md | 35 ----
.../query/images/insight/insight_input_query.png | Bin 0 -> 246765 bytes
.../query/images/insight/insight_list_history.png | Bin 0 -> 145144 bytes
.../query/images/insight/insight_list_tables.png | Bin 0 -> 165006 bytes
.../query/images/insight/insight_save_query.png | Bin 0 -> 162428 bytes
.../query/images/insight/insight_show_result.png | Bin 0 -> 81352 bytes
.../query/images/insight/insight_step_duration.png | Bin 0 -> 139037 bytes
.../query/images/insight/insight_stop_query.png | Bin 0 -> 210129 bytes
.../images/insight/insight_stop_query_result.png | Bin 0 -> 215318 bytes
.../query/images/insight/insight_visualization.png | Bin 0 -> 98814 bytes
.../images/pushdown/multi_check_export.en.png | Bin 323220 -> 0 bytes
.../query/images/pushdown/one_click_copy.en.png | Bin 230644 -> 0 bytes
website/docs/query/images/pushdown/pushdown.en.png | Bin 145785 -> 0 bytes
.../pushdown/pushdown.png} | Bin
website/docs/query/images/pushdown/sorting.en.png | Bin 376473 -> 0 bytes
.../history1.png} | Bin
.../history2.png} | Bin
.../history3.png} | Bin
.../history4.png} | Bin
.../history5.png} | Bin
.../images/visualization/result_display_bar.png | Bin
.../images/visualization/result_display_line.png | Bin
.../images/visualization/result_display_pie.png | Bin
website/docs/query/insight.md | 79 ++++++++
.../query/insight/images/data_sql/date_sql1.png | Bin 68417 -> 0 bytes
.../query/insight/images/data_sql/date_sql2.png | Bin 69851 -> 0 bytes
.../insight/images/insight/insight_input_query.png | Bin 36415 -> 0 bytes
.../images/insight/insight_list_history.png | Bin 124844 -> 0 bytes
.../insight/images/insight/insight_list_tables.png | Bin 162241 -> 0 bytes
.../insight/images/insight/insight_save_query.png | Bin 19561 -> 0 bytes
.../insight/images/insight/insight_show_result.png | Bin 46656 -> 0 bytes
.../images/insight/insight_step_duration1.png | Bin 39239 -> 0 bytes
.../insight/images/insight/insight_stop_query.png | Bin 28138 -> 0 bytes
.../images/insight/insight_stop_query_result.png | Bin 36180 -> 0 bytes
.../images/insight/insight_visualization.png | Bin 341314 -> 0 bytes
.../images/pushdown/multi_check_export.en.png | Bin 323220 -> 0 bytes
.../insight/images/pushdown/one_click_copy.en.png | Bin 230644 -> 0 bytes
.../query/insight/images/pushdown/pushdown.en.png | Bin 145785 -> 0 bytes
.../query/insight/images/pushdown/sorting.en.png | Bin 376473 -> 0 bytes
website/docs/query/insight/images/spec/1.png | Bin 42897 -> 0 bytes
website/docs/query/insight/images/spec/4.png | Bin 41281 -> 0 bytes
website/docs/query/insight/images/spec/5.png | Bin 45295 -> 0 bytes
website/docs/query/insight/images/spec/6.png | Bin 46880 -> 0 bytes
website/docs/query/insight/insight.md | 99 ----------
website/docs/query/insight/intro.md | 47 -----
.../function/aggregate_function.md | 27 ---
.../function/arithmetic_function.md | 58 ------
.../operator_function/function/bitmap_function.md | 155 ---------------
.../function/conditional_function.md | 25 ---
.../function/datetime_function.md | 46 -----
.../function/grouping_function.md | 95 ----------
.../function/images/arithmetic_function.png | Bin 9573 -> 0 bytes
.../function/intersect_function.md | 195 -------------------
.../insight/operator_function/function/intro.md | 30 ---
.../function/miscellaneous_function.md | 23 ---
.../operator_function/function/string_function.md | 50 -----
.../operator_function/function/type_function.md | 28 ---
.../operator_function/function/window_function.md | 163 ----------------
.../docs/query/insight/operator_function/intro.md | 18 --
.../operator/arithmetic_operator.md | 23 ---
.../operator/comparison_operator.md | 38 ----
.../operator_function/operator/images/string.png | Bin 85727 -> 0 bytes
.../insight/operator_function/operator/intro.md | 17 --
.../operator_function/operator/logical_operator.md | 28 ---
.../operator_function/operator/string_operator.md | 19 --
website/docs/query/intro.md | 17 --
website/docs/query/optimization/intro.md | 19 --
website/docs/query/principles/by_internal_table.md | 16 ++
website/docs/query/principles/by_model.md | 17 ++
website/docs/query/principles/precalculation.md | 41 ++++
.../pushdown_to_embedded_spark.md => push_down.md} | 13 +-
website/docs/query/pushdown/intro.md | 20 --
.../docs/query/{history.md => query_history.md} | 48 +++--
.../docs/query/specification/bitmap_function.md | 162 ++++++++++++++++
website/docs/query/specification/data_type.md | 86 +++++++++
website/docs/query/specification/functions.md | 188 ++++++++++++++++++
.../docs/query/specification/grouping_function.md | 100 ++++++++++
.../images/bitmap_uuid.1.png | Bin
.../images/first_last_value.png | Bin
.../function => specification}/images/grouping.png | Bin
.../images/grouping_sets_function.png | Bin
.../images/intersect_bitmap_uuid.1.png | Bin
.../images/intersect_bitmap_uuid2.1.png | Bin
.../images/intersect_count.1.png | Bin
.../images/intersect_count.2.png | Bin
.../images/intersect_count2.1.png | Bin
.../images/intersect_count_by_col.1.png | Bin
.../images/intersect_value.1.png | Bin
.../images/intersect_value.2.png | Bin
.../images/intersect_value2.1.png | Bin
.../function => specification}/images/lead_lag.png | Bin
.../function => specification}/images/ntile.png | Bin
.../images/rank_and_drank.png | Bin
.../images/rollup_function.png | Bin
.../images/row_number.png | Bin
.../docs/query/specification/intersect_function.md | 211 +++++++++++++++++++++
website/docs/query/specification/operators.md | 70 +++++++
.../query/{insight => specification}/sql_spec.md | 94 ++++-----
.../docs/query/specification/window_function.md | 161 ++++++++++++++++
.../tuning/count_distinct_expr.md} | 18 +-
.../segment_pruning.md => tuning/data_skipping.md} | 10 +-
.../operator_function => tuning}/model_priority.md | 29 +--
website/docs/query/tuning/partial_match_join.md | 16 ++
.../{optimization => tuning}/query_enhanced.md | 8 +-
.../tuning}/sum_expression.md | 12 +-
website/docs/query/tuning/transformations.md | 16 ++
website/docs/quickstart/intro.md | 2 +-
website/docs/quickstart/tutorial.md | 4 +-
website/sidebars.ts | 177 +++++------------
121 files changed, 1546 insertions(+), 1720 deletions(-)
diff --git a/website/docs/configuration/config.md b/website/docs/configuration/config.md
new file mode 100644
index 0000000000..7c677e3666
--- /dev/null
+++ b/website/docs/configuration/config.md
@@ -0,0 +1,192 @@
+---
+title: Basic Configuration
+language: en
+sidebar_label: Basic Configuration
+pagination_label: Basic Configuration
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - Basic Configuration
+draft: false
+last_update:
+ date: 09/12/2024
+---
+
+This chapter provides an in-depth look at frequently used configurations in Kylin. The following sections outline the main topics covered:
+
+### Kylin Properties File
+
+The `kylin.properties` file is a crucial configuration file in Kylin, containing key settings that impact the application's behavior. This section provides an in-depth explanation of commonly used properties, enabling you to optimize your Kylin setup.
+
+| Properties | Description [...]
+| ------------------------------------------------------------ |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [...]
+| kylin.circuit-breaker.threshold.model | The maximum number of models allowed to be created in a single project, the default value is `100` [...]
+| kylin.circuit-breaker.threshold.project | The maximum number of projects allowed to be created, the default value is `100` [...]
+| kylin.circuit-breaker.threshold.query-result-row-count | This parameter is the maximum number of rows in the result set returned by the SQL query. The default is `2000000`. If the maximum number of rows is exceeded, the backend will throw an exception [...]
+| kylin.diag.task-timeout | The subtask timeout time for the diagnostic package, whose default value is 3 minutes [...]
+| kylin.diag.task-timeout-black-list | Diagnostic package subtask timeout blacklist (the values are separated by commas). The subtasks in the blacklist will be skipped by the timeout settings and will run until it finished. The default value is `METADATA`, `LOG` <br />The optional value is as below: <br />METADATA, AUDIT_LOG, CLIENT, JSTACK, CONF, HADOOP_CONF, BIN, HADOOP_ENV, CATALOG_INFO, SYSTEM_METRICS, MONITOR_METRICS, SPARK_LOGS, SPARDER_HISTORY, KG_LOGS, L [...]
+| kylin.diag.obf.level | The desensitization level of the diagnostic package. `RAW` means no desensitization, `OBF` means desensitization. Configuring `OBF` will desensitize sensitive information such as usernames and passwords in the `kylin.properties` file (please refer to the [Diagnosis Kit Tool](../operations/system-operation/cli_tool/diagnosis.md) chapter), The default value is `OBF`. [...]
+| kylin.engine.sanity-check-enabled | Configure Kylin whether to open Sanity Check during indexes building. The default value is `true` [...]
+| kylin.engine.spark-conf.spark.driver.host | Configure the IP of the node where the Kylin is located [...]
+| kylin.engine.spark-conf.spark.sql.view-truncate-enabled=true | Allow spark view to lose precision during construction, the default value is false [...]
+| kylin.env | The usage of the Kylin instance is specified by this property. Optional values include `DEV`, `PROD` and `QA`, among them `PROD` is the default one. In `DEV` mode some developer functions are enabled. [...]
+| kylin.env.ip-address | When the network address of the node where the Kylin service is located has the ipv6 format, you can specify the ipv4 format through this configuration item. The default is `0.0.0.0` [...]
+| kylin.env.hdfs-working-dir | Working path of Kylin instance on HDFS is specified by this property. The default value is `/kylin` on HDFS, with table name in metadata path as the sub-directory. For example, suppose the metadata path is `kylin_metadata@jdbc`, the HDFS default path should be `/kylin/kylin_metadata`. Please make sure the user running Kylin instance has read/write permissions on that directory. [...]
+| kylin.env.zookeeper-connect-string | This parameter specifies the address of ZooKeeper. There is no default value. **This parameter must be manually configured before starting Kylin instance**, otherwise Kylin will not start. [...]
+| kylin.garbage.storage.cuboid-layout-survival-time-threshold | This property specifies the threshold of invalid files on HDFS. When executing the command line tool to clean up the garbage, invalid files on HDFS that exceed this threshold will be cleaned up. The default value is `7d`, which means 7 days. Invalid files on HDFS include expired indexes, expired snapshots, expired dictionaries, etc. At the same time, indexes with lower cost performance will be cleaned up according to the in [...]
+| kylin.garbage.storage.executable-survival-time-threshold | This property specifies the threshold for the expired job. The metadata of jobs that have exceeded this threshold and have been completed will be cleaned up. The default is `30d`, which means 30 days. [...]
+| kylin.influxdb.address | This property specifies the address of InfluxDB. The default is `localhost:8086`. [...]
+| kylin.influxdb.password | This property specifiess the password of InfluxDB. The default is `root`. [...]
+| kylin.influxdb.username | This property specifies the username of InfluxDB. The defaul is `root`. [...]
+| kylin.job.finished-notifier-url | When the building job is completed, the job status information will be sent to the url via HTTP request [...]
+| kylin.job.max-concurrent-jobs | Kylin has a default concurrency limit of **20** for jobs in a single project. If there are already too many running jobs reaching the limit, the new submitted job will be added into job queue. Once one running job finishes, jobs in the queue will be scheduled using FIFO mechanism. [...]
+| kylin.job.retry | This property specifies the auto retry times for error jobs. The default value is 0, which means job will not auto retry when it's in error. Set a value greater than 0 to enable this property and it applies on every step within a job and it will be reset if that step is finished. [...]
+| kylin.job.retry-interval | This property specifies the time interval to retry an error job and the default value is `30000` ms. This property is valid only when the job retry property is set to be 1 or above. [...]
+| kylin.metadata.url | Kylin metadata path is specified by this property. The default value is `kylin_metadata` table in PostgreSQL while users can customize it to store metadata into any other table. When deploying multiple Kylin instances on a cluster, it's necessary to specify a unique path for each of them to guarantee the isolation among them. For example, the value of this property for Production instance could be `kylin_metadata_prod`, whi [...]
+| kylin.metadata.ops-cron | This parameter specifies the timing task cron expression for timed backup metadata and garbage cleanup. The default value is `0 0 0 * * *`. [...]
+| kylin.metadata.audit-log.max-size | This parameter specifies the maximum number of rows in the audit-log. The default value is `500000`. [...]
+| kylin.metadata.compress.enabled | This parameter specifies whether to compress the contents of metadata and audit log. The default value is `true`. [...]
+| kylin.metrics.influx-rpc-service-bind-address | If the property `# bind-address = "127.0.0.1:8088"` was modified in the influxdb's configuration file, the value of this should be modified at the same time. This parameter will influence whether the diagnostic package can contain system metrics. [...]
+| kylin.query.async-query.max-concurrent-jobs | When configuring the asynchronous query queue, the maximum number of asynchronous query jobs. When the number of jobs reaches the limit, the asynchronous query reports an error. The default value is 0, which means there is no limit to the number of asynchronous query jobs. [...]
+| kylin.query.auto-model-view-enabled | Automatically generate views for model. When the config is on, a view will be generated for each model and user can query on that view. The view will be named with \{project_name\}.\{model_name\} and contains all the tables defined in the model and all the columns referenced by the dimension and measure of the table. [...]
+| kylin.query.convert-create-table-to-with | Some BI software will send Create Table statement to create a permanent or temporary table in the data source. If this setting is set to `true`, the create table statement in the query will be converted to a with statement, when a later query utilizes the table that the query created in the previous step, the create table statement will be converted into a subquery, which can hit on an index if there is one to serve the que [...]
+| kylin.query.engine.spark-scheduler-mode | The scheduling strategy of query engine whose default is FAIR (Fair scheduler). The optional value is SJF (Smallest Job First scheduler). Other value is illegal and FAIR strategy will be used as the default strategy. [...]
+| kylin.query.force-limit | Some BI tools always send query like `select * from fact_table`, but the process may stuck if the table size is extremely large. `LIMIT` clause helps in this case, and setting the value of this property to a positive integer make Kylin append `LIMIT` clause if there's no one. For instance the value is `1000`, query `select * from fact_table` will be transformed to `select * from fact_table limit 1000`. This configuration ca [...]
+| kylin.query.init-sparder-async | The default value is `true`,which means that sparder will start asynchronously. Therefore, the Kylin web service and the query spark service will start separately; If set to `false`, the Kylin web service will be only available after the sparder service has been started. [...]
+| kylin.query.layout.prefer-aggindex | The default value is `true`, which means that when index comparison selections are made for aggregate indexes and detail indexes, aggregate indexes are preferred. [...]
+| kylin.query.match-partial-inner-join-model | The default value is `false`, which means that the multi-table inner join model does not support the SQL which matches the inner join part partially. For example: Assume there are three tables A, B, and C . By default, the SQL `A inner join B` can only be answered by the model of A inner join B or the model of A inner join B left join C. The model of A inner join B inner join C cannot answer it. If this parameter is set to [...]
+| kylin.query.match-partial-non-equi-join-model | default to `false` ,currently if the model contains non-equi joins, the query can be matched with the model only if it contains all the non-equi joins defined in the model. If the config is set to `true`, the query is allowed to contain only part of the non-equi joins. e.g. model: A left join B non-equi left join C. When the config is set to `false`, only query with the complete join relations of the model can be matched wi [...]
+| kylin.query.max-result-rows | This property specifies the maximum number of rows that a query can return. This property applies on all ways of executing queries, including Web UI, Asynchronous Query, JDBC Driver and ODBC Driver. This configuration can be overridden at **project** level. For this property to take effect, it needs to be a positive integer less than or equal to 2147483647. The default value is 0, meaning no limit on the result. <br />Below [...]
+| kylin.query.memory-limit-during-collect-mb | Limit the memory usage when getting query result in Kylin,the unit is megabytes, defaults to 5400mb [...]
+| kylin.query.queryhistory.max-size | The total number of records in the query history of all projects, the default is 10000000 [...]
+| kylin.query.queryhistory.project-max-size | The number of records in the query history retained of a single project, the default is 1000000 [...]
+| kylin.query.queryhistory.survival-time-threshold | The number of records in the query history retention time of all items, the default is 30d, which means 30 days, and other units are also supported: millisecond ms, microsecond us, minute m or min, hour h [...]
+| kylin.query.realization.chooser.thread-core-num | The number of core threads of the model matching thread pool in the query engine, the default is 5. It should be noted that when the number of core threads is set to less than 0, this thread pool will be unavailable, which will cause the entire query engine to be unavailable [...]
+| kylin.query.realization.chooser.thread-max-num | The maximum number of threads in the model matching thread pool in the query engine, the default is 50. It should be noted that when the maximum number of threads is set to be less than or equal to 0 or less than the number of core threads, this thread pool will be unavailable, which will cause the entire query engine to be unavailable [...]
+| kylin.query.replace-count-column-with-count-star | The default value is `false` , which means that COUNT(column) measure will hit a model only after it has been set up in the model. If COUNT(column) measure is called in SQL while not having been set up in the model, this parameter value can be set to `true`, then the system will use COUNT(constant) measure to replace COUNT(column) measure approximately. COUNT(constant) measure takes all Null value into calculation. [...]
+| kylin.query.replace-dynamic-params-enabled | Whether to enable dynamic parameter binding for JDBC query, the default value is false, which means it is not enabled. For more, please refer to [Kylin JDBC Driver](#TODO) [...]
+| kylin.query.spark-job-trace-enabled | Enable the job tracking log of spark. Record additional information about spark: Submission waiting time, execution waiting time, execution time and result acquisition time are displayed in the timeline of history. [...]
+| kylin.query.spark-job-trace-timeout-ms | Only for the job tracking log of spark. The longest waiting time of query history. If it exceeds, the job tracking log of spark will not be recorded. [...]
+| kylin.query.spark-job-trace-cache-max | Only for the job tracking log of spark. The maximum number of job tracking log caches in spark. The elimination strategy is LRU,TTL is kylin.query.spark-job-trace-timeout-ms + 20000 ms. [...]
+| kylin.query.spark-job-trace-parallel-max | Only for the job tracking log of spark. Spark's job tracks the concurrency of log processing, "Additional information about spark" will be lost if the concurrency exceeds this limit. [...]
+| kylin.query.timeout-seconds | Query timeout, in seconds. The default value is `300` seconds. If the query execution time exceeds 300 seconds, an error will be returned: `Query timeout after: 300s`. The minimum value is `30` seconds, and the configured value less than `30` seconds also takes effect according to `30` seconds. [...]
+| kylin.query.use-tableindex-answer-non-raw-query | The default value is `false`, which means that the aggregate query can only be answered with the aggregate index. If the parameter is set to `true`, the system allows the corresponding table index to be used to answer the aggregate query. [...]
+| kylin.scheduler.schedule-job-timeout-minute | Job execution timeout period. The default is `0` minute. This property is valid only when the it is set to be 1 or above. When the job execution exceeds the timeout period, it will change to the Error status. [...]
+| kylin.security.user-password-encoder | Encryption algorithm of user password. The default is the BCrypt algorithm. If you want to use the Pbkdf2 algorithm, configure the value to <br />org.springframework.security.crypto.<br />password.Pbkdf2PasswordEncoder. <br />Note: Please do not change this configuration item arbitrarily, otherwise the user may not be able to log in [...]
+| kylin.server.cors.allow-all | allow all corss origin requests(CORS). `true` for allowing any CORS request, `false` for refusing all CORS requests. Default to `false`. [...]
+| kylin.server.cors.allowed-origin | Specify a whitelist that allows cross-domain, default all domain names (*), use commas (,) to separate multiple domain names. This parameter is valid when `kylin.server.cors.allow-all`=true [...]
+| kylin.server.mode | There are three modes in Kylin, `all` , `query` and `job`, and you can change it by modifying the property. The default value is `all`. For `query` mode, it can only serves queries. For`job` mode, it can run building jobs and execute metadata operations and cannot serve queries. `all` mode can handle both of them. [...]
+| kylin.source.hive.databases | Configure the database list loaded by the data source. There is no default value. Both the system level and the project level can be configured. The priority of the project level is greater than the system level. [...]
+| kylin.storage.columnar.spark-conf.spark.sql.view-truncate-enabled | Allow spark view to lose precision when loading tables and queries, the default value is false [...]
+| kylin.storage.columnar.spark-conf.spark.yarn.queue | This property specifies the yarn queue which is used by spark query cluster. [...]
+| kylin.storage.columnar.spark-conf.spark.master | Spark deployment is normally divided into **Spark on YARN**, **Spark on Mesos**, and **standalone**. We usually use Spark on YARN as default. This property enables Kylin to use standalone deployment, which could submit jobs to the specific spark-master-url. [...]
+| kylin.storage.columnar.spark-conf.spark.driver.host | Configure the IP of the node where the Kylin is located [...]
+| kylin.storage.columnar.spark-conf.spark.sql.cartesianPartitionNumThreshold | Threshold for Cartesian Partition number in Spark Execution Plan. Query will be terminated if Cartesian Partition number reaches or exceeds the threshold. If this value is set to empty or negative, the threshold will be set to spark.executor.cores * spark.executor.instances * 100. [...]
+| kylin.storage.quota-in-giga-bytes | This property specifies the storage quota for each project. The default is `10240`, in gigabytes. [...]
+| kylin.web.timezone | Time zone used for Kylin Rest service is specified by this property. The default value is the time zone of the local machine's system. You can change it according to the requirement of your application. For more details, please refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones with the `TZ database name` column. [...]
+| kylin.web.export-allow-admin | Whether to allow Admin user to export query results to a CSV file, the default is true. [...]
+| kylin.web.export-allow-other | Whether to allow non-Admin user to export query results to a CSV file, the default is true. [...]
+| kylin.web.stack-trace.enabled | The error prompts whether the popup window displays details. The default value is false. Introduced in: 4.1.1 [...]
+| kylin.web.session.secure-random-create-enabled | The default is false. Use UUID to generate sessionId, and use JDK's SecureRandom random number to enable sessionId after MD5 encryption, please use the upgrade session table tool to upgrade the session table first otherwise the user will report an error when logging in. [...]
+| kylin.web.session.jdbc-encode-enabled | The default is false, sessionId is saved directly into the database without encryption, and sessionId will be encrypted and saved to the database after opening. Note: If the encryption function is configured, Please use the upgrade session table tool to upgrade the session table first, otherwise the user will report an error when logging in. [...]
+| server.port | This parameter specifies the port used by the Kylin service. The default is `7070`. [...]
+| server.address | This parameter specifies the address used by the Kylin service. The default is `0.0.0.0`. [...]
+
+
+### Modifying Kylin Properties
+
+To override default configurations, create a `kylin.properties.override` file in the `$KYLIN_HOME/conf` directory. This file allows you to customize settings at runtime.
+
+**Best Practice:** During system upgrades, retain the `kylin.properties.override` file with the new `kylin.properties` version to ensure a seamless transition.
+
+**Important Note:** Parameters defined in `kylin.properties` or `kylin.properties.override` are global and loaded by default when Kylin starts. After modifying these files, restart Kylin for the changes to take effect.
+
+
+### Modifying JVM Settings
+
+In the `$KYLIN_HOME/conf/setenv.sh.template` file, you'll find a sample setting for the `KYLIN_JVM_SETTINGS` environment variable. This default setting uses relatively little memory, but you can adjust it according to your own environment. The default JVM configuration is as follows:
+
+```properties
+export KYLIN_JVM_SETTINGS="-server -Xms1g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:G1HeapRegionSize=16m -XX:+PrintFlagsFinal -XX:+PrintReferenceGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintAdaptiveSizePolicy -XX:+UnlockDiagnosticVMOptions -XX:+G1SummarizeConcMark -Xloggc:$KYLIN_HOME/logs/kylin.gc.$$ -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=64M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${KYLIN_HOME}/logs"
+```
+
+If you want to modify this configuration, you need to create a copy of the template file, name it `setenv.sh`, and place it in the `$KYLIN_HOME/conf/` directory. You can then modify the configuration in the new file as needed.
+
+The parameter `-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${KYLIN_HOME}/logs` generates logs when an `OutOfMemory` error occurs. The default log file path is `${KYLIN_HOME}/logs`, but you can modify it if required.
+```bash
+export JAVA_VM_XMS=1g #The initial memory of the JVM when kylin starts.
+export JAVA_VM_XMX=8g #The maximum memory of the JVM when kylin starts.
+export JAVA_VM_TOOL_XMS=1g #The initial memory of the JVM when the tool class is started.
+export JAVA_VM_TOOL_XMX=8g #The maximum memory of the JVM when the tool class is started.
+```
+
+The `JAVA_VM_TOOL_XMS` and `JAVA_VM_TOOL_XMX` environment variables control the initial and maximum memory of the JVM when running tool classes. If these variables are not set, they will default to the values of `JAVA_VM_XMS` and `JAVA_VM_XMX`, respectively.
+
+Please note that some special tool classes, such as `guardian.sh`, `check-2100-hive-acl.sh`, and `get-properties.sh`, are not affected by these configurations. To take advantage of these new configurations, you need to manually set the `JAVA_VM_TOOL_XMS` and `JAVA_VM_TOOL_XMX` variables when upgrading from an older version.
+
+
+### Modifying Spark Configurations
+
+Kylin relies heavily on Apache Spark for both query and job building. To customize Spark configurations, use the following prefixes:
+
+* `kylin.storage.columnar.spark-conf` for queries
+* `kylin.engine.spark-conf` for builds
+
+These prefixes can be used to customize various Spark settings, such as memory allocation, execution parameters, and more. For a detailed explanation of Spark configuration, please refer to the official documentation: [Spark Configuration](https://spark.apache.org/docs/latest/configuration.html).
+
+**1. Query-Related Configurations**
+
+```shell
+kylin.storage.columnar.spark-conf.executor.instances
+kylin.storage.columnar.spark-conf.executor.cores
+kylin.storage.columnar.spark-conf.executor.memory
+kylin.storage.columnar.spark-conf.executor.memoryOverhead
+kylin.storage.columnar.spark-conf.sql.shuffle.partitions
+kylin.storage.columnar.spark-conf.driver.memory
+kylin.storage.columnar.spark-conf.driver.memoryOverhead
+kylin.storage.columnar.spark-conf.driver.cores
+```
+
+**2. Job Building-Related Configurations**
+
+```shell
+kylin.engine.spark-conf.spark.executor.instances
+kylin.engine.spark-conf.spark.executor.cores
+kylin.engine.spark-conf.spark.executor.memory
+kylin.engine.spark-conf.spark.executor.memoryOverhead
+kylin.engine.spark-conf.spark.sql.shuffle.partitions
+kylin.engine.spark-conf.spark.driver.memory
+kylin.engine.spark-conf.spark.driver.memoryOverhead
+kylin.engine.spark-conf.spark.driver.cores
+```
+
+**3. Switching to Minimal Configurations**
+
+Under **$KYLIN_HOME/conf/**, there are two sets of configurations ready for use: `production` and `minimal`. The former is the default configuration, recommended for production environments. The latter uses minimal resources, suitable for sandbox or single-node environments with limited resources. To switch to `minimal` configurations, please uncomment the following configuration items in `$KYLIN_HOME/conf/kylin.properties` and restart Kylin to take effect:
+```shell
+# Kylin provides two configuration profiles: minimal and production(by default).
+# To switch to minimal: uncomment the properties
+#kylin.storage.columnar.spark-conf.spark.driver.memory=512m
+#kylin.storage.columnar.spark-conf.spark.executor.memory=512m
+#kylin.storage.columnar.spark-conf.spark.executor.memoryOverhead=512m
+#kylin.storage.columnar.spark-conf.spark.executor.extraJavaOptions=-Dhdp.version=current -Dlog4j.configurationFile=spark-executor-log4j.xml -Dlog4j.debug -Dkylin.hdfs.working.dir=${kylin.env.hdfs-working-dir} -Dkap.metadata.identifier=${kylin.metadata.url.identifier} -Dkap.spark.category=sparder -Dkap.spark.project=${job.project} -XX:MaxDirectMemorySize=512M
+#kylin.storage.columnar.spark-conf.spark.yarn.am.memory=512m
+#kylin.storage.columnar.spark-conf.spark.executor.cores=1
+#kylin.storage.columnar.spark-conf.spark.executor.instances=1
+#kylin.storage.columnar.spark-conf.spark.sql.adaptive.coalescePartitions.minPartitionNum=1
+```
+
+### Sparder Canary Overview
+
+Sparder Canary is a health monitoring component for the Sparder application, which is the Spark engine used for querying in Kylin. It periodically checks the status of the running Sparder instance and automatically initiates the creation of a new instance if any abnormalities are detected, such as unexpected termination or loss of responsiveness. This ensures that the Sparder application remains in a healthy and functional state at all times.
+
+| Properties | Description |
+|----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| kylin.canary.sqlcontext-enabled | Whether to enable the Sparder Canary function, the default is `false` |
+| kylin.canary.sqlcontext-threshold-to-restart-spark | When the number of abnormal detection times exceeds this threshold, restart spark context |
+| kylin.canary.sqlcontext-period-min | Check interval, default is `3` minutes |
+| kylin.canary.sqlcontext-error-response-ms | Single detection timeout time, the default is `3` minutes, if single detection timeout means no response from spark context |
+| kylin.canary.sqlcontext-type | The detection method, the default is `file`, this method confirms whether the spark context is still running normally by writing a parquet file to the directory configured by `kylin.env.hdfs-working-dir` . It can also be configured as `count` to confirm whether the spark context is running normally by performing an accumulation operation | |
+
diff --git a/website/docs/configuration/configuration.md b/website/docs/configuration/configuration.md
deleted file mode 100644
index d1ffd91745..0000000000
--- a/website/docs/configuration/configuration.md
+++ /dev/null
@@ -1,191 +0,0 @@
----
-title: Basic Configuration
-language: en
-sidebar_label: Basic Configuration
-pagination_label: Basic Configuration
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - Basic Configuration
-draft: false
-last_update:
- date: 09/12/2024
----
-
-This chapter provides an in-depth look at frequently used configurations in Kylin. The following sections outline the main topics covered:
-
-### Kylin Properties File
-
-The `kylin.properties` file is a crucial configuration file in Kylin, containing key settings that impact the application's behavior. This section provides an in-depth explanation of commonly used properties, enabling you to optimize your Kylin setup.
-
-| Properties | Description |
-| ------------------------------------------------------------ | ------------------------------------------------------------ |
-| kylin.circuit-breaker.threshold.model | The maximum number of models allowed to be created in a single project, the default value is `100` |
-| kylin.circuit-breaker.threshold.project | The maximum number of projects allowed to be created, the default value is `100` |
-| kylin.circuit-breaker.threshold.query-result-row-count | This parameter is the maximum number of rows in the result set returned by the SQL query. The default is `2000000`. If the maximum number of rows is exceeded, the backend will throw an exception |
-| kylin.diag.task-timeout | The subtask timeout time for the diagnostic package, whose default value is 3 minutes |
-| kylin.diag.task-timeout-black-list | Diagnostic package subtask timeout blacklist (the values are separated by commas). The subtasks in the blacklist will be skipped by the timeout settings and will run until it finished. The default value is `METADATA`, `LOG` <br />The optional value is as below: <br />METADATA, AUDIT_LOG, CLIENT, JSTACK, CONF, HADOOP_CONF, BIN, HADOOP_ENV, CATALOG_INFO, SYSTEM_METRICS, MONITOR_METRICS, SPARK_LOGS, SPARDER_HISTORY, KG_LOGS, L [...]
-| kylin.diag.obf.level | The desensitization level of the diagnostic package. `RAW` means no desensitization, `OBF` means desensitization. Configuring `OBF` will desensitize sensitive information such as usernames and passwords in the `kylin.properties` file (please refer to the [Diagnosis Kit Tool](../operations/system-operation/cli_tool/diagnosis.md) chapter), The default value is `OBF`. |
-| kylin.engine.sanity-check-enabled | Configure Kylin whether to open Sanity Check during indexes building. The default value is `true` |
-| kylin.engine.spark-conf.spark.driver.host | Configure the IP of the node where the Kylin is located |
-| kylin.engine.spark-conf.spark.sql.view-truncate-enabled=true | Allow spark view to lose precision during construction, the default value is false |
-| kylin.env | The usage of the Kylin instance is specified by this property. Optional values include `DEV`, `PROD` and `QA`, among them `PROD` is the default one. In `DEV` mode some developer functions are enabled. |
-| kylin.env.ip-address | When the network address of the node where the Kylin service is located has the ipv6 format, you can specify the ipv4 format through this configuration item. The default is `0.0.0.0` |
-| kylin.env.hdfs-working-dir | Working path of Kylin instance on HDFS is specified by this property. The default value is `/kylin` on HDFS, with table name in metadata path as the sub-directory. For example, suppose the metadata path is `kylin_metadata@jdbc`, the HDFS default path should be `/kylin/kylin_metadata`. Please make sure the user running Kylin instance has read/write permissions on that directory. |
-| kylin.env.zookeeper-connect-string | This parameter specifies the address of ZooKeeper. There is no default value. **This parameter must be manually configured before starting Kylin instance**, otherwise Kylin will not start. |
-| kylin.garbage.storage.cuboid-layout-survival-time-threshold | This property specifies the threshold of invalid files on HDFS. When executing the command line tool to clean up the garbage, invalid files on HDFS that exceed this threshold will be cleaned up. The default value is `7d`, which means 7 days. Invalid files on HDFS include expired indexes, expired snapshots, expired dictionaries, etc. At the same time, indexes with lower cost performance will be cleaned up according to the in [...]
-| kylin.garbage.storage.executable-survival-time-threshold | This property specifies the threshold for the expired job. The metadata of jobs that have exceeded this threshold and have been completed will be cleaned up. The default is `30d`, which means 30 days. |
-| kylin.influxdb.address | This property specifies the address of InfluxDB. The default is `localhost:8086`. |
-| kylin.influxdb.password | This property specifiess the password of InfluxDB. The default is `root`. |
-| kylin.influxdb.username | This property specifies the username of InfluxDB. The defaul is `root`. |
-| kylin.job.finished-notifier-url | When the building job is completed, the job status information will be sent to the url via HTTP request |
-| kylin.job.max-concurrent-jobs | Kylin has a default concurrency limit of **20** for jobs in a single project. If there are already too many running jobs reaching the limit, the new submitted job will be added into job queue. Once one running job finishes, jobs in the queue will be scheduled using FIFO mechanism. |
-| kylin.job.retry | This property specifies the auto retry times for error jobs. The default value is 0, which means job will not auto retry when it's in error. Set a value greater than 0 to enable this property and it applies on every step within a job and it will be reset if that step is finished. |
-| kylin.job.retry-interval | This property specifies the time interval to retry an error job and the default value is `30000` ms. This property is valid only when the job retry property is set to be 1 or above. |
-| kylin.metadata.url | Kylin metadata path is specified by this property. The default value is `kylin_metadata` table in PostgreSQL while users can customize it to store metadata into any other table. When deploying multiple Kylin instances on a cluster, it's necessary to specify a unique path for each of them to guarantee the isolation among them. For example, the value of this property for Production instance could be `kylin_metadata_prod`, whi [...]
-| kylin.metadata.ops-cron | This parameter specifies the timing task cron expression for timed backup metadata and garbage cleanup. The default value is `0 0 0 * * *`. |
-| kylin.metadata.audit-log.max-size | This parameter specifies the maximum number of rows in the audit-log. The default value is `500000`. |
-| kylin.metadata.compress.enabled | This parameter specifies whether to compress the contents of metadata and audit log. The default value is `true`. |
-| kylin.metrics.influx-rpc-service-bind-address | If the property `# bind-address = "127.0.0.1:8088"` was modified in the influxdb's configuration file, the value of this should be modified at the same time. This parameter will influence whether the diagnostic package can contain system metrics. |
-| kylin.query.async-query.max-concurrent-jobs | When configuring the asynchronous query queue, the maximum number of asynchronous query jobs. When the number of jobs reaches the limit, the asynchronous query reports an error. The default value is 0, which means there is no limit to the number of asynchronous query jobs. |
-| kylin.query.auto-model-view-enabled | Automatically generate views for model. When the config is on, a view will be generated for each model and user can query on that view. The view will be named with {project_name}.{model_name} and contains all the tables defined in the model and all the columns referenced by the dimension and measure of the table. |
-| kylin.query.convert-create-table-to-with | Some BI software will send Create Table statement to create a permanent or temporary table in the data source. If this setting is set to `true`, the create table statement in the query will be converted to a with statement, when a later query utilizes the table that the query created in the previous step, the create table statement will be converted into a subquery, which can hit on an index if there is one to serve the query. |
-| kylin.query.engine.spark-scheduler-mode | The scheduling strategy of query engine whose default is FAIR (Fair scheduler). The optional value is SJF (Smallest Job First scheduler). Other value is illegal and FAIR strategy will be used as the default strategy. |
-| kylin.query.force-limit | Some BI tools always send query like `select * from fact_table`, but the process may stuck if the table size is extremely large. `LIMIT` clause helps in this case, and setting the value of this property to a positive integer make Kylin append `LIMIT` clause if there's no one. For instance the value is `1000`, query `select * from fact_table` will be transformed to `select * from fact_table limit 1000`. This configuration ca [...]
-| kylin.query.init-sparder-async | The default value is `true`,which means that sparder will start asynchronously. Therefore, the Kylin web service and the query spark service will start separately; If set to `false`, the Kylin web service will be only available after the sparder service has been started. |
-| kylin.query.layout.prefer-aggindex | The default value is `true`, which means that when index comparison selections are made for aggregate indexes and detail indexes, aggregate indexes are preferred. |
-| kylin.query.match-partial-inner-join-model | The default value is `false`, which means that the multi-table inner join model does not support the SQL which matches the inner join part partially. For example: Assume there are three tables A, B, and C . By default, the SQL `A inner join B` can only be answered by the model of A inner join B or the model of A inner join B left join C. The model of A inner join B inner join C cannot answer it. If this parameter is set to [...]
-| kylin.query.match-partial-non-equi-join-model | default to `false` ,currently if the model contains non-equi joins, the query can be matched with the model only if it contains all the non-equi joins defined in the model. If the config is set to `true`, the query is allowed to contain only part of the non-equi joins. e.g. model: A left join B non-equi left join C. When the config is set to `false`, only query with the complete join relations of the model can be matched wi [...]
-| kylin.query.max-result-rows | This property specifies the maximum number of rows that a query can return. This property applies on all ways of executing queries, including Web UI, Asynchronous Query, JDBC Driver and ODBC Driver. This configuration can be overridden at **project** level. For this property to take effect, it needs to be a positive integer less than or equal to 2147483647. The default value is 0, meaning no limit on the result. <br />Below [...]
-| kylin.query.memory-limit-during-collect-mb | Limit the memory usage when getting query result in Kylin,the unit is megabytes, defaults to 5400mb |
-| kylin.query.queryhistory.max-size | The total number of records in the query history of all projects, the default is 10000000 |
-| kylin.query.queryhistory.project-max-size | The number of records in the query history retained of a single project, the default is 1000000 |
-| kylin.query.queryhistory.survival-time-threshold | The number of records in the query history retention time of all items, the default is 30d, which means 30 days, and other units are also supported: millisecond ms, microsecond us, minute m or min, hour h |
-| kylin.query.realization.chooser.thread-core-num | The number of core threads of the model matching thread pool in the query engine, the default is 5. It should be noted that when the number of core threads is set to less than 0, this thread pool will be unavailable, which will cause the entire query engine to be unavailable |
-| kylin.query.realization.chooser.thread-max-num | The maximum number of threads in the model matching thread pool in the query engine, the default is 50. It should be noted that when the maximum number of threads is set to be less than or equal to 0 or less than the number of core threads, this thread pool will be unavailable, which will cause the entire query engine to be unavailable |
-| kylin.query.replace-count-column-with-count-star | The default value is `false` , which means that COUNT(column) measure will hit a model only after it has been set up in the model. If COUNT(column) measure is called in SQL while not having been set up in the model, this parameter value can be set to `true`, then the system will use COUNT(constant) measure to replace COUNT(column) measure approximately. COUNT(constant) measure takes all Null value into calculation. |
-| kylin.query.replace-dynamic-params-enabled | Whether to enable dynamic parameter binding for JDBC query, the default value is false, which means it is not enabled. For more, please refer to [Kylin JDBC Driver](#TODO) |
-| kylin.query.spark-job-trace-enabled | Enable the job tracking log of spark. Record additional information about spark: Submission waiting time, execution waiting time, execution time and result acquisition time are displayed in the timeline of history. |
-| kylin.query.spark-job-trace-timeout-ms | Only for the job tracking log of spark. The longest waiting time of query history. If it exceeds, the job tracking log of spark will not be recorded. |
-| kylin.query.spark-job-trace-cache-max | Only for the job tracking log of spark. The maximum number of job tracking log caches in spark. The elimination strategy is LRU,TTL is kylin.query.spark-job-trace-timeout-ms + 20000 ms. |
-| kylin.query.spark-job-trace-parallel-max | Only for the job tracking log of spark. Spark's job tracks the concurrency of log processing, "Additional information about spark" will be lost if the concurrency exceeds this limit. |
-| kylin.query.timeout-seconds | Query timeout, in seconds. The default value is `300` seconds. If the query execution time exceeds 300 seconds, an error will be returned: `Query timeout after: 300s`. The minimum value is `30` seconds, and the configured value less than `30` seconds also takes effect according to `30` seconds. |
-| kylin.query.use-tableindex-answer-non-raw-query | The default value is `false`, which means that the aggregate query can only be answered with the aggregate index. If the parameter is set to `true`, the system allows the corresponding table index to be used to answer the aggregate query. |
-| kylin.scheduler.schedule-job-timeout-minute | Job execution timeout period. The default is `0` minute. This property is valid only when the it is set to be 1 or above. When the job execution exceeds the timeout period, it will change to the Error status. |
-| kylin.security.user-password-encoder | Encryption algorithm of user password. The default is the BCrypt algorithm. If you want to use the Pbkdf2 algorithm, configure the value to <br />org.springframework.security.crypto.<br />password.Pbkdf2PasswordEncoder. <br />Note: Please do not change this configuration item arbitrarily, otherwise the user may not be able to log in |
-| kylin.server.cors.allow-all | allow all corss origin requests(CORS). `true` for allowing any CORS request, `false` for refusing all CORS requests. Default to `false`. |
-| kylin.server.cors.allowed-origin | Specify a whitelist that allows cross-domain, default all domain names (*), use commas (,) to separate multiple domain names. This parameter is valid when `kylin.server.cors.allow-all`=true |
-| kylin.server.mode | There are three modes in Kylin, `all` , `query` and `job`, and you can change it by modifying the property. The default value is `all`. For `query` mode, it can only serves queries. For`job` mode, it can run building jobs and execute metadata operations and cannot serve queries. `all` mode can handle both of them. |
-| kylin.source.hive.databases | Configure the database list loaded by the data source. There is no default value. Both the system level and the project level can be configured. The priority of the project level is greater than the system level. |
-| kylin.storage.columnar.spark-conf.spark.sql.view-truncate-enabled | Allow spark view to lose precision when loading tables and queries, the default value is false |
-| kylin.storage.columnar.spark-conf.spark.yarn.queue | This property specifies the yarn queue which is used by spark query cluster. |
-| kylin.storage.columnar.spark-conf.spark.master | Spark deployment is normally divided into **Spark on YARN**, **Spark on Mesos**, and **standalone**. We usually use Spark on YARN as default. This property enables Kylin to use standalone deployment, which could submit jobs to the specific spark-master-url. |
-| kylin.storage.columnar.spark-conf.spark.driver.host | Configure the IP of the node where the Kylin is located |
-| kylin.storage.columnar.spark-conf.spark.sql.cartesianPartitionNumThreshold | Threshold for Cartesian Partition number in Spark Execution Plan. Query will be terminated if Cartesian Partition number reaches or exceeds the threshold. If this value is set to empty or negative, the threshold will be set to spark.executor.cores * spark.executor.instances * 100. |
-| kylin.storage.quota-in-giga-bytes | This property specifies the storage quota for each project. The default is `10240`, in gigabytes. |
-| kylin.web.timezone | Time zone used for Kylin Rest service is specified by this property. The default value is the time zone of the local machine's system. You can change it according to the requirement of your application. For more details, please refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones with the `TZ database name` column. |
-| kylin.web.export-allow-admin | Whether to allow Admin user to export query results to a CSV file, the default is true. |
-| kylin.web.export-allow-other | Whether to allow non-Admin user to export query results to a CSV file, the default is true. |
-| kylin.web.stack-trace.enabled | The error prompts whether the popup window displays details. The default value is false. Introduced in: 4.1.1 |
-| kylin.web.session.secure-random-create-enabled | The default is false. Use UUID to generate sessionId, and use JDK's SecureRandom random number to enable sessionId after MD5 encryption, please use the upgrade session table tool to upgrade the session table first otherwise the user will report an error when logging in. |
-| kylin.web.session.jdbc-encode-enabled | The default is false, sessionId is saved directly into the database without encryption, and sessionId will be encrypted and saved to the database after opening. Note: If the encryption function is configured, Please use the upgrade session table tool to upgrade the session table first, otherwise the user will report an error when logging in. |
-| server.port | This parameter specifies the port used by the Kylin service. The default is `7070`. |
-| server.address | This parameter specifies the address used by the Kylin service. The default is `0.0.0.0`. |
-
-
-### Modifying Kylin Properties
-
-To override default configurations, create a `kylin.properties.override` file in the `$KYLIN_HOME/conf` directory. This file allows you to customize settings at runtime.
-
-**Best Practice:** During system upgrades, retain the `kylin.properties.override` file with the new `kylin.properties` version to ensure a seamless transition.
-
-**Important Note:** Parameters defined in `kylin.properties` or `kylin.properties.override` are global and loaded by default when Kylin starts. After modifying these files, restart Kylin for the changes to take effect.
-
-
-### Modifying JVM Settings
-
-In the `$KYLIN_HOME/conf/setenv.sh.template` file, you'll find a sample setting for the `KYLIN_JVM_SETTINGS` environment variable. This default setting uses relatively little memory, but you can adjust it according to your own environment. The default JVM configuration is as follows:
-
-```properties
-export KYLIN_JVM_SETTINGS="-server -Xms1g -Xmx8g -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:G1HeapRegionSize=16m -XX:+PrintFlagsFinal -XX:+PrintReferenceGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+PrintAdaptiveSizePolicy -XX:+UnlockDiagnosticVMOptions -XX:+G1SummarizeConcMark -Xloggc:$KYLIN_HOME/logs/kylin.gc.$$ -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=64M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${KYLIN_HOME}/logs"
-```
-
-If you want to modify this configuration, you need to create a copy of the template file, name it `setenv.sh`, and place it in the `$KYLIN_HOME/conf/` directory. You can then modify the configuration in the new file as needed.
-
-The parameter `-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${KYLIN_HOME}/logs` generates logs when an `OutOfMemory` error occurs. The default log file path is `${KYLIN_HOME}/logs`, but you can modify it if required.
-```bash
-export JAVA_VM_XMS=1g #The initial memory of the JVM when kylin starts.
-export JAVA_VM_XMX=8g #The maximum memory of the JVM when kylin starts.
-export JAVA_VM_TOOL_XMS=1g #The initial memory of the JVM when the tool class is started.
-export JAVA_VM_TOOL_XMX=8g #The maximum memory of the JVM when the tool class is started.
-```
-
-The `JAVA_VM_TOOL_XMS` and `JAVA_VM_TOOL_XMX` environment variables control the initial and maximum memory of the JVM when running tool classes. If these variables are not set, they will default to the values of `JAVA_VM_XMS` and `JAVA_VM_XMX`, respectively.
-
-Please note that some special tool classes, such as `guardian.sh`, `check-2100-hive-acl.sh`, and `get-properties.sh`, are not affected by these configurations. To take advantage of these new configurations, you need to manually set the `JAVA_VM_TOOL_XMS` and `JAVA_VM_TOOL_XMX` variables when upgrading from an older version.
-
-
-### Modifying Spark Configurations
-
-Kylin relies heavily on Apache Spark for both query and job building. To customize Spark configurations, use the following prefixes:
-
-* `kylin.storage.columnar.spark-conf` for queries
-* `kylin.engine.spark-conf` for builds
-
-These prefixes can be used to customize various Spark settings, such as memory allocation, execution parameters, and more. For a detailed explanation of Spark configuration, please refer to the official documentation: [Spark Configuration](https://spark.apache.org/docs/latest/configuration.html).
-
-**1. Query-Related Configurations**
-
-```shell
-kylin.storage.columnar.spark-conf.executor.instances
-kylin.storage.columnar.spark-conf.executor.cores
-kylin.storage.columnar.spark-conf.executor.memory
-kylin.storage.columnar.spark-conf.executor.memoryOverhead
-kylin.storage.columnar.spark-conf.sql.shuffle.partitions
-kylin.storage.columnar.spark-conf.driver.memory
-kylin.storage.columnar.spark-conf.driver.memoryOverhead
-kylin.storage.columnar.spark-conf.driver.cores
-```
-
-**2. Job Building-Related Configurations**
-
-```shell
-kylin.engine.spark-conf.spark.executor.instances
-kylin.engine.spark-conf.spark.executor.cores
-kylin.engine.spark-conf.spark.executor.memory
-kylin.engine.spark-conf.spark.executor.memoryOverhead
-kylin.engine.spark-conf.spark.sql.shuffle.partitions
-kylin.engine.spark-conf.spark.driver.memory
-kylin.engine.spark-conf.spark.driver.memoryOverhead
-kylin.engine.spark-conf.spark.driver.cores
-```
-
-**3. Switching to Minimal Configurations**
-
-Under **$KYLIN_HOME/conf/**, there are two sets of configurations ready for use: `production` and `minimal`. The former is the default configuration, recommended for production environments. The latter uses minimal resources, suitable for sandbox or single-node environments with limited resources. To switch to `minimal` configurations, please uncomment the following configuration items in `$KYLIN_HOME/conf/kylin.properties` and restart Kylin to take effect:
-```shell
-# Kylin provides two configuration profiles: minimal and production(by default).
-# To switch to minimal: uncomment the properties
-#kylin.storage.columnar.spark-conf.spark.driver.memory=512m
-#kylin.storage.columnar.spark-conf.spark.executor.memory=512m
-#kylin.storage.columnar.spark-conf.spark.executor.memoryOverhead=512m
-#kylin.storage.columnar.spark-conf.spark.executor.extraJavaOptions=-Dhdp.version=current -Dlog4j.configurationFile=spark-executor-log4j.xml -Dlog4j.debug -Dkylin.hdfs.working.dir=${kylin.env.hdfs-working-dir} -Dkap.metadata.identifier=${kylin.metadata.url.identifier} -Dkap.spark.category=sparder -Dkap.spark.project=${job.project} -XX:MaxDirectMemorySize=512M
-#kylin.storage.columnar.spark-conf.spark.yarn.am.memory=512m
-#kylin.storage.columnar.spark-conf.spark.executor.cores=1
-#kylin.storage.columnar.spark-conf.spark.executor.instances=1
-#kylin.storage.columnar.spark-conf.spark.sql.adaptive.coalescePartitions.minPartitionNum=1
-```
-
-### Sparder Canary Overview
-
-Sparder Canary is a health monitoring component for the Sparder application, which is the Spark engine used for querying in Kylin. It periodically checks the status of the running Sparder instance and automatically initiates the creation of a new instance if any abnormalities are detected, such as unexpected termination or loss of responsiveness. This ensures that the Sparder application remains in a healthy and functional state at all times.
-
-| Properties | Description |
-| ----------------------------------------------------------- | ------------------------------------------------------------ |
-| kylin.canary.sqlcontext-enabled | Whether to enable the Sparder Canary function, the default is `false` |
-| kylin.canary.sqlcontext-threshold-to-restart-spark | When the number of abnormal detection times exceeds this threshold, restart spark context |
-| kylin.canary.sqlcontext-period-min | Check interval, default is `3` minutes |
-| kylin.canary.sqlcontext-error-response-ms | Single detection timeout time, the default is `3` minutes, if single detection timeout means no response from spark context |
-| kylin.canary.sqlcontext-type | The detection method, the default is `file`, this method confirms whether the spark context is still running normally by writing a parquet file to the directory configured by `kylin.env.hdfs-working-dir` . It can also be configured as `count` to confirm whether the spark context is running normally by performing an accumulation operation| |
diff --git a/website/docs/configuration/intro.md b/website/docs/configuration/intro.md
index 42203485df..d48ea6225b 100644
--- a/website/docs/configuration/intro.md
+++ b/website/docs/configuration/intro.md
@@ -21,7 +21,7 @@ This chapter introduces some configurations for Kylin.
| Component | File | Description |
| -------------------- | --------------------------- | ------------------------------------------------------------ |
-| Kylin | conf/kylin.properties | This is the global configuration file, with all configuration properties about Kylin in it. Details will be discussed in the subsequent chapter [Basic Configuration](configuration.md). |
+| Kylin | conf/kylin.properties | This is the global configuration file, with all configuration properties about Kylin in it. Details will be discussed in the subsequent chapter [Basic Configuration](config). |
| Hadoop | hadoop_conf/core-site.xml | Global configuration file used by Hadoop, which defines system-level parameters such as HDFS URLs and Hadoop temporary directories, etc. |
| Hadoop | hadoop_conf/hdfs-site.xml | HDFS configuration file, which defines HDFS parameters such as the storage location of NameNode and DataNode and the number of file copies, etc. |
| Hadoop | hadoop_conf/yarn-site.xml | Yarn configuration file,which defines Hadoop cluster resource management system parameters, such as ResourceManager, NodeManager communication port and web monitoring port, etc. |
diff --git a/website/docs/datasource/import_hive.md b/website/docs/datasource/import_hive.md
index 488353d137..9a601bc0ca 100755
--- a/website/docs/datasource/import_hive.md
+++ b/website/docs/datasource/import_hive.md
@@ -20,7 +20,7 @@ Leveraging the capability of Apache Hive, Kylin has effectively solved the query
Apache Hive is a distributed, fault-tolerant data warehouse software that enables analytics at a massive scale. With Apache Hive to map structured data into tables and precomputation offered by Kylin, you can easily identify and manage your business' most valuable data, and uncover new insights from any size dataset, at any time, and from anywhere.
-This article introduces how to load Hive data source to a Kylin [project](../operations/project-managing/project_management.md) for [model designing](../modeling/intro.md) and [data analysis](../query/intro.md).
+This article introduces how to load Hive data source to a Kylin [project](../operations/project-managing/project_management.md) for [model designing](../modeling/intro.md) and [data analysis](../query/insight).
### Notes
@@ -62,7 +62,7 @@ This article introduces how to load Hive data source to a Kylin [project](../ope
- Question: How to load Hive transactional tables?
- Answer: Before loading, you need to add `kylin.build.resource.read-transactional-table-enabled=true` to the configuration file, and configure parameter `kylin.source.hive.beeline-params`. For more information, see [Configure basic parameters](../configuration/configuration.md).
+ Answer: Before loading, you need to add `kylin.build.resource.read-transactional-table-enabled=true` to the configuration file, and configure parameter `kylin.source.hive.beeline-params`. For more information, see [Configure basic parameters](../configuration/config).
- Question: Besides Hive data source, what other data sources does Kylin support?
diff --git a/website/docs/internaltable/query_internal_table.md b/website/docs/internaltable/query_internal_table.md
index 4ca4c88973..29e1274459 100644
--- a/website/docs/internaltable/query_internal_table.md
+++ b/website/docs/internaltable/query_internal_table.md
@@ -17,7 +17,7 @@ last_update:
### 1. Preparation Work
- There is no difference in the query interface between internal table queries and model queries. For details, refer to [SQL Queries](../query/intro.md).
+ There is no difference in the query interface between internal table queries and model queries. For details, refer to [SQL Queries](../query/insight).
You do not need to rewrite any SQL, but you must ensure that all tables you are querying have had internal tables created and have imported data.
diff --git a/website/docs/modeling/auto_modeling/basic_concept_actions.md b/website/docs/modeling/auto_modeling/basic_concept_actions.md
index d1d91f98bd..60b39d0f85 100644
--- a/website/docs/modeling/auto_modeling/basic_concept_actions.md
+++ b/website/docs/modeling/auto_modeling/basic_concept_actions.md
@@ -61,7 +61,7 @@ Kylin mainly provides recommendations on index addition or deletion, and related
- Question: When system resources are limited, which parameters can I use to control the resources consumed by Intelligent Recommendation?
- Answer: You can reduce the resources that Intelligent Recommendation uses by lowering the value of the following two parameters in system [configuration file](../../configuration/configuration.md).
+ Answer: You can reduce the resources that Intelligent Recommendation uses by lowering the value of the following two parameters in system [configuration file](../../configuration/config).
```
# This parameter is used for controlling the maximum queries processed by each scheduled task.
diff --git a/website/docs/modeling/auto_modeling/data_modeling_by_SQL.md b/website/docs/modeling/auto_modeling/data_modeling_by_SQL.md
index 93a91f79dc..cec3418586 100755
--- a/website/docs/modeling/auto_modeling/data_modeling_by_SQL.md
+++ b/website/docs/modeling/auto_modeling/data_modeling_by_SQL.md
@@ -78,7 +78,7 @@ Kylin model consists of tables and their join relations, as well as defined dime
- **Model Name**: It is automatically generated and takes the format `AUTO_MODEL_FACT TABLE NAME_NUMBER`. You can also manually adjust the model name. It can be any combination of numbers, letters, and underscores (`_`). The maximum length of the model name is 127 characters. When the fact table name is too long, the system will automatically truncate the fact table name from the end to ensure that the automatically generated model name is less than or equal to 127 characters. When t [...]
- **Add Base Indexes**: Basic indexes include base aggregated indexes and base table indexes. Base aggregated indexes contain all model dimensions and measures, and base table indexes contain columns used in all model dimensions and measures.
- It's recommended to keep it selected to avoid frequent [query pushdowns](../../query/pushdown/pushdown_to_embedded_spark.md) which may increase query response times. By default, base indexes will automatically update with model changes.
+ It's recommended to keep it selected to avoid frequent [query push_down](../../query/push_down.md) which may increase query response times. By default, base indexes will automatically update with model changes.
8. Click **OK**. Kylin will automatically start to design a model and indexes.
diff --git a/website/docs/modeling/model_design/computed_column.md b/website/docs/modeling/model_design/computed_column.md
index f6126f9a7d..8e0dba4968 100644
--- a/website/docs/modeling/model_design/computed_column.md
+++ b/website/docs/modeling/model_design/computed_column.md
@@ -56,7 +56,7 @@ This section will describe the supported computed columns in Kylin, which includ
- Unexpected errors may occur when the computed column share the same name with other columns.
- Aggregate functions such as `SUM`, `MIN`, `MAX`, etc. are not allowed when defining the computed column expression.
- Expression only containing constants is not recommended to create computed column, such as `POWER(CAST(2 AS DOUBLE), 2)`.
- - If a function expression contains a column using the keywords as column name, it cannot be recommended as a computed column. For more details about keywords, please refer the **Keywords** section in [SQL Specification](../../query/insight/sql_spec.md).
+ - If a function expression contains a column using the keywords as column name, it cannot be recommended as a computed column. For more details about keywords, please refer the **Keywords** section in [SQL Specification](../../query/specification/sql_spec.md)
- Computed columns only support `Hive` data source in current version.
- Computed columns cannot be used as time partition columns and join keys.
- If a function expression contains a table name or column name that is not started with letters or includes special characters, need to double quote this name. For example: `"100_KYLIN_SALES"."100_PRICE" * "100_KYLIN_SALES"."200_ITEM_COUNT"`
diff --git a/website/docs/modeling/real-time/prerequisite.md b/website/docs/modeling/real-time/prerequisite.md
index 70f5d6921f..5c02ab81f6 100644
--- a/website/docs/modeling/real-time/prerequisite.md
+++ b/website/docs/modeling/real-time/prerequisite.md
@@ -38,7 +38,7 @@ If there's no DNS server in LAN, you need to manually add the IP address and Hos
### Other requirements
-- The time across Kylin and Kafka clusters are synchronized. On how to change the time for Kylin, see [Basic Configuration](../../configuration/configuration.md).
+- The time across Kylin and Kafka clusters are synchronized. On how to change the time for Kylin, see [Basic Configuration](../../configuration/config).
- When authentication mechanism is enabled on Hadoop or Kafka cluster, further configurations are needed:
@@ -101,4 +101,4 @@ If there's no DNS server in LAN, you need to manually add the IP address and Hos
- `{username}`: Kafka username
- `{password}`: Kafka password
-</details>
\ No newline at end of file
+</details>
diff --git a/website/docs/modeling/real-time/real-time.md b/website/docs/modeling/real-time/real-time.md
index c3073e428d..06f5f9182e 100644
--- a/website/docs/modeling/real-time/real-time.md
+++ b/website/docs/modeling/real-time/real-time.md
@@ -99,7 +99,7 @@ This article discusses how to work with Kylin Real-Time, including how to load s
- Question: How to check the status of streaming data jobs?
- Answer: In the left navigation panel, click **Monitor** > **Streaming Job** to check job status. You can customize job parameters by clicking  of the target job. To learn more about parameters, see [Basic Configuration](../../configuration/configuration.md).
+ Answer: In the left navigation panel, click **Monitor** > **Streaming Job** to check job status. You can customize job parameters by clicking  of the target job. To learn more about parameters, see [Basic Configuration](../../configuration/config).
- Question: If a query can be answered with data from either Kafka or Hive tables, will there be any data duplication?
diff --git a/website/docs/operations/job-monitoring/intro.md b/website/docs/operations/job-monitoring/intro.md
index 1f49fd5ff1..1c541497e6 100644
--- a/website/docs/operations/job-monitoring/intro.md
+++ b/website/docs/operations/job-monitoring/intro.md
@@ -21,6 +21,6 @@ The job is built in the process of using Kylin, such as building an index and re
For a clearer understanding of how to trigger a job, we recommend reading the following sections before continuing with this chapter.
- [Data Source](../../datasource/intro.md)
-- [SQL Query](../../query/intro.md)
+- [SQL Query](../../query/insight)
- [Model](../../modeling/intro.md)
diff --git a/website/docs/query/insight/async_query.md b/website/docs/query/async_query.md
similarity index 97%
rename from website/docs/query/insight/async_query.md
rename to website/docs/query/async_query.md
index e9cfa1185e..e102696ab3 100644
--- a/website/docs/query/insight/async_query.md
+++ b/website/docs/query/async_query.md
@@ -1,8 +1,8 @@
---
-title: Asynchronous query
+title: Asynchronous Query
language: en
-sidebar_label: Asynchronous query
-pagination_label: Asynchronous query
+sidebar_label: Asynchronous Query
+pagination_label: Asynchronous Query
toc_min_heading_level: 2
toc_max_heading_level: 6
pagination_prev: null
@@ -20,7 +20,7 @@ Asynchronous query supports users to execute SQL queries asynchronously and prov
Too large (million results) or SQL execution time is too long, through asynchronous query, the query result set can be exported efficiently to realize self-service data retrieval
Various application scenarios.
-Currently, asynchronous query only supports calling REST API. For how to use asynchronous query API, please read-[Asynchronous Query API](../../restapi/async_query_api.md).
+Currently, asynchronous query only supports calling REST API. For how to use asynchronous query API, please read-[Asynchronous Query API](../restapi/async_query_api.md).
### Configure the retention time for asynchronous query results
diff --git a/website/docs/query/data_type.md b/website/docs/query/data_type.md
deleted file mode 100644
index 6c7a912477..0000000000
--- a/website/docs/query/data_type.md
+++ /dev/null
@@ -1,35 +0,0 @@
----
-title: Data Types
-language: en
-sidebar_label: Data Types
-pagination_label: Data Types
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - data types
-draft: false
-last_update:
- date: 08/17/2022
----
-
-Supported data types:
-
-| Data Types | Description | Range of Numbers |
-| ----------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| tinyint | Small interger numbers. | (-128,127) |
-| smallint | Small interger numbers. | (-32,768,32,767) |
-| int/integer | Integer numbers. | (-2,147,483,648,2,147,483,647) |
-| bigint | Large integer numbers. | (-9,223,372,036,854,775,808,9,223,372,036,854,775,807) |
-| float | Single-precision floating point numbers. | (-3.402823466E+38,-1.175494351E-38),0,(1.175494351E-38,3.402823466351E+38) |
-| double | Double-precision floating point numbers. | (-1.7976931348623157E+308,-2.2250738585072014E-308),0,(2.2250738585072014E-308,1.797693134 8623157E+308) |
-| decimal | An exact numeric data type defined by its *precision* (total number of digits) and *scale* (number of digits to the right of the decimal point). | --- |
-| timestamp | Values comprising values of fields year, month, day, hour, minute, and second, with the session local time-zone. The timestamp value represents an absolute point in time. | --- |
-| date | Values comprising values of fields year, month and day, without a time-zone | --- |
-| varchar | Variable length string | --- |
-| char | Fixed length string | --- |
-| boolean | Boolean values | --- |
-
-> **Note**: There is an inaccurate accuracy problem when calculating double type data.
-
diff --git a/website/docs/query/images/insight/insight_input_query.png b/website/docs/query/images/insight/insight_input_query.png
new file mode 100644
index 0000000000..1db4db7aad
Binary files /dev/null and b/website/docs/query/images/insight/insight_input_query.png differ
diff --git a/website/docs/query/images/insight/insight_list_history.png b/website/docs/query/images/insight/insight_list_history.png
new file mode 100644
index 0000000000..2b075c2631
Binary files /dev/null and b/website/docs/query/images/insight/insight_list_history.png differ
diff --git a/website/docs/query/images/insight/insight_list_tables.png b/website/docs/query/images/insight/insight_list_tables.png
new file mode 100644
index 0000000000..066b6d8b93
Binary files /dev/null and b/website/docs/query/images/insight/insight_list_tables.png differ
diff --git a/website/docs/query/images/insight/insight_save_query.png b/website/docs/query/images/insight/insight_save_query.png
new file mode 100644
index 0000000000..7ea7ffbd04
Binary files /dev/null and b/website/docs/query/images/insight/insight_save_query.png differ
diff --git a/website/docs/query/images/insight/insight_show_result.png b/website/docs/query/images/insight/insight_show_result.png
new file mode 100644
index 0000000000..a6ebea1305
Binary files /dev/null and b/website/docs/query/images/insight/insight_show_result.png differ
diff --git a/website/docs/query/images/insight/insight_step_duration.png b/website/docs/query/images/insight/insight_step_duration.png
new file mode 100644
index 0000000000..b10bfa64b3
Binary files /dev/null and b/website/docs/query/images/insight/insight_step_duration.png differ
diff --git a/website/docs/query/images/insight/insight_stop_query.png b/website/docs/query/images/insight/insight_stop_query.png
new file mode 100644
index 0000000000..0db051a84e
Binary files /dev/null and b/website/docs/query/images/insight/insight_stop_query.png differ
diff --git a/website/docs/query/images/insight/insight_stop_query_result.png b/website/docs/query/images/insight/insight_stop_query_result.png
new file mode 100644
index 0000000000..5386dfaffc
Binary files /dev/null and b/website/docs/query/images/insight/insight_stop_query_result.png differ
diff --git a/website/docs/query/images/insight/insight_visualization.png b/website/docs/query/images/insight/insight_visualization.png
new file mode 100644
index 0000000000..b7767e918c
Binary files /dev/null and b/website/docs/query/images/insight/insight_visualization.png differ
diff --git a/website/docs/query/images/pushdown/multi_check_export.en.png b/website/docs/query/images/pushdown/multi_check_export.en.png
deleted file mode 100644
index 08b684f8ff..0000000000
Binary files a/website/docs/query/images/pushdown/multi_check_export.en.png and /dev/null differ
diff --git a/website/docs/query/images/pushdown/one_click_copy.en.png b/website/docs/query/images/pushdown/one_click_copy.en.png
deleted file mode 100644
index 29a1c7d5b3..0000000000
Binary files a/website/docs/query/images/pushdown/one_click_copy.en.png and /dev/null differ
diff --git a/website/docs/query/images/pushdown/pushdown.en.png b/website/docs/query/images/pushdown/pushdown.en.png
deleted file mode 100644
index 03ca97430c..0000000000
Binary files a/website/docs/query/images/pushdown/pushdown.en.png and /dev/null differ
diff --git a/website/docs/query/pushdown/images/query_pushdown.png b/website/docs/query/images/pushdown/pushdown.png
similarity index 100%
rename from website/docs/query/pushdown/images/query_pushdown.png
rename to website/docs/query/images/pushdown/pushdown.png
diff --git a/website/docs/query/images/pushdown/sorting.en.png b/website/docs/query/images/pushdown/sorting.en.png
deleted file mode 100644
index 0023cf771f..0000000000
Binary files a/website/docs/query/images/pushdown/sorting.en.png and /dev/null differ
diff --git a/website/docs/query/images/query_history.png b/website/docs/query/images/query_history/history1.png
similarity index 100%
rename from website/docs/query/images/query_history.png
rename to website/docs/query/images/query_history/history1.png
diff --git a/website/docs/query/images/query_history2.png b/website/docs/query/images/query_history/history2.png
similarity index 100%
rename from website/docs/query/images/query_history2.png
rename to website/docs/query/images/query_history/history2.png
diff --git a/website/docs/query/images/query_history3.png b/website/docs/query/images/query_history/history3.png
similarity index 100%
rename from website/docs/query/images/query_history3.png
rename to website/docs/query/images/query_history/history3.png
diff --git a/website/docs/query/images/query_history4.png b/website/docs/query/images/query_history/history4.png
similarity index 100%
rename from website/docs/query/images/query_history4.png
rename to website/docs/query/images/query_history/history4.png
diff --git a/website/docs/query/images/query_history5.png b/website/docs/query/images/query_history/history5.png
similarity index 100%
rename from website/docs/query/images/query_history5.png
rename to website/docs/query/images/query_history/history5.png
diff --git a/website/docs/query/insight/images/visualization/result_display_bar.png b/website/docs/query/images/visualization/result_display_bar.png
similarity index 100%
rename from website/docs/query/insight/images/visualization/result_display_bar.png
rename to website/docs/query/images/visualization/result_display_bar.png
diff --git a/website/docs/query/insight/images/visualization/result_display_line.png b/website/docs/query/images/visualization/result_display_line.png
similarity index 100%
rename from website/docs/query/insight/images/visualization/result_display_line.png
rename to website/docs/query/images/visualization/result_display_line.png
diff --git a/website/docs/query/insight/images/visualization/result_display_pie.png b/website/docs/query/images/visualization/result_display_pie.png
similarity index 100%
rename from website/docs/query/insight/images/visualization/result_display_pie.png
rename to website/docs/query/images/visualization/result_display_pie.png
diff --git a/website/docs/query/insight.md b/website/docs/query/insight.md
new file mode 100644
index 0000000000..bd9845083c
--- /dev/null
+++ b/website/docs/query/insight.md
@@ -0,0 +1,79 @@
+---
+title: Query Insight
+language: en
+sidebar_label: Query Insight
+pagination_label: Query Insight
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - query insight
+draft: false
+last_update:
+ date: 09/13/2024
+---
+
+Kylin’s Intelligent OLAP Platform simplifies complex multidimensional analytics on massive datasets, achieving sub-second query response times through precomputation and index-building jobs. Unlike traditional methods that rely on real-time calculations, Kylin uses precalculated data to answer queries, significantly boosting performance. This innovative approach eliminates the need for real-time processing, delivering ultra-fast results and making Kylin an ideal solution for high-speed a [...]
+
+This document describes how to use the Query Insight feature in Kylin.
+
+### Overview
+
+To access Kylin's Web UI, click on **Query -> Insight** in the navigation bar. All queryable tables will appear on the left side of the page. You can enter your SQL query in the text box on the right, and the query results will be displayed in the text box below.
+
+
+
+
+### Run Query
+
+To execute a query, enter a `SELECT` statement and click **Run Query** to view the results. You will notice a **Limit** field in the bottom right corner. If your SQL statement does not include a `LIMIT` clause, the system will automatically impose a default limit of 500 rows. To disable this limit entirely, you can uncheck the checkbox next to the limit field.
+
+After the query results are successfully returned, you will notice that the query execution time is approximately 0.24 seconds, and the query has hit the model. Additionally, the query ID is followed by an arrow. Clicking this arrow will take you to the query's page in the Spark UI. On this page, you can easily observe the SQL execution details within Spark, providing insight into how the query was processed.
+
+
+
+When optimizing slow queries, it's essential to analyze the specific execution steps to identify the root causes. To do this, hover your mouse over the **Durations** of the query. This action will display detailed execution steps along with their respective durations, helping you pinpoint the steps that may be contributing to the slow performance. By examining these details, you can better understand where optimization is needed.
+
+
+
+:::tip Notices
+1. Only query starts with **SELECT** or **EXPLAIN** are supported.
+2. When query pushdown is enabled, queries that cannot be answered by the model (index group) will be routed to the pushdown engine for execution. In such cases, the query may take longer to return and could be executed by datasource(maybe Hive). Please refer to [Pushdown](push_down.md) for more details.
+3. If the query does not require Spark computation, such as hitting the query cache or involves constant queries, there will be no arrow next to the query ID.
+:::
+
+### Stop Query
+
+After clicking the **Run Query** button, you can stop the query by clicking the **Stop Query** button, which will appear in the same position. In this example, the query is pushed down to the Hive datasource. For more information, please refer to the [Pushdown](push_down.md) documentation.
+
+
+
+After the query is stopped, query ID and error message will be displayed.
+
+
+
+
+### Save Query
+
+On the **SQL Editor** page, users can save queries by clicking the **Save** button in the bottom left corner. This action will trigger a pop-up window where you can enter a **Query Name** and a **Description**. Once you've filled in the details, click the **Submit** button to finish the saving process.
+
+
+
+### Query Result
+
+By default, Kylin displays query results in a table format. You can perform a fuzzy search for specific content using the Filter box at the top right of the query result. For example, if you enter "1992," each row in the query results that contains "1992" will be displayed, such as the daily order volume for the year 1992. Additionally, you have the option to export the query results to a CSV file.
+
+
+
+However, you can click the **Visualization** button on the results page to display the query results in a chart format. The available chart types include line chart, bar chart, and pie chart. Below is an example of the query results displayed in a line chart format. You can also choose different dimensions and metrics to customize the data shown in the chart.
+
+
+
+### Saved Query
+
+Click the **Saved Queries** button at the top right of the SQL Editor to view all saved queries. A pop-up window will display a list of saved queries. By default, each query item is collapsed. To view the SQL, click the **Details** button next to the desired query. You can also check the box in front of a query and click the **Run Query** button to re-execute it.
+
+
+
+
diff --git a/website/docs/query/insight/images/data_sql/date_sql1.png b/website/docs/query/insight/images/data_sql/date_sql1.png
deleted file mode 100644
index 1c1118ec81..0000000000
Binary files a/website/docs/query/insight/images/data_sql/date_sql1.png and /dev/null differ
diff --git a/website/docs/query/insight/images/data_sql/date_sql2.png b/website/docs/query/insight/images/data_sql/date_sql2.png
deleted file mode 100644
index 292d4c0d27..0000000000
Binary files a/website/docs/query/insight/images/data_sql/date_sql2.png and /dev/null differ
diff --git a/website/docs/query/insight/images/insight/insight_input_query.png b/website/docs/query/insight/images/insight/insight_input_query.png
deleted file mode 100644
index 87bf74768c..0000000000
Binary files a/website/docs/query/insight/images/insight/insight_input_query.png and /dev/null differ
diff --git a/website/docs/query/insight/images/insight/insight_list_history.png b/website/docs/query/insight/images/insight/insight_list_history.png
deleted file mode 100644
index 960c39e994..0000000000
Binary files a/website/docs/query/insight/images/insight/insight_list_history.png and /dev/null differ
diff --git a/website/docs/query/insight/images/insight/insight_list_tables.png b/website/docs/query/insight/images/insight/insight_list_tables.png
deleted file mode 100644
index 4f2b339396..0000000000
Binary files a/website/docs/query/insight/images/insight/insight_list_tables.png and /dev/null differ
diff --git a/website/docs/query/insight/images/insight/insight_save_query.png b/website/docs/query/insight/images/insight/insight_save_query.png
deleted file mode 100644
index ed70dd27ae..0000000000
Binary files a/website/docs/query/insight/images/insight/insight_save_query.png and /dev/null differ
diff --git a/website/docs/query/insight/images/insight/insight_show_result.png b/website/docs/query/insight/images/insight/insight_show_result.png
deleted file mode 100644
index 28420f4f91..0000000000
Binary files a/website/docs/query/insight/images/insight/insight_show_result.png and /dev/null differ
diff --git a/website/docs/query/insight/images/insight/insight_step_duration1.png b/website/docs/query/insight/images/insight/insight_step_duration1.png
deleted file mode 100644
index 8757d8c702..0000000000
Binary files a/website/docs/query/insight/images/insight/insight_step_duration1.png and /dev/null differ
diff --git a/website/docs/query/insight/images/insight/insight_stop_query.png b/website/docs/query/insight/images/insight/insight_stop_query.png
deleted file mode 100644
index 2dd0bef65a..0000000000
Binary files a/website/docs/query/insight/images/insight/insight_stop_query.png and /dev/null differ
diff --git a/website/docs/query/insight/images/insight/insight_stop_query_result.png b/website/docs/query/insight/images/insight/insight_stop_query_result.png
deleted file mode 100644
index 7599cac5c8..0000000000
Binary files a/website/docs/query/insight/images/insight/insight_stop_query_result.png and /dev/null differ
diff --git a/website/docs/query/insight/images/insight/insight_visualization.png b/website/docs/query/insight/images/insight/insight_visualization.png
deleted file mode 100644
index 859ef9b345..0000000000
Binary files a/website/docs/query/insight/images/insight/insight_visualization.png and /dev/null differ
diff --git a/website/docs/query/insight/images/pushdown/multi_check_export.en.png b/website/docs/query/insight/images/pushdown/multi_check_export.en.png
deleted file mode 100644
index 08b684f8ff..0000000000
Binary files a/website/docs/query/insight/images/pushdown/multi_check_export.en.png and /dev/null differ
diff --git a/website/docs/query/insight/images/pushdown/one_click_copy.en.png b/website/docs/query/insight/images/pushdown/one_click_copy.en.png
deleted file mode 100644
index 29a1c7d5b3..0000000000
Binary files a/website/docs/query/insight/images/pushdown/one_click_copy.en.png and /dev/null differ
diff --git a/website/docs/query/insight/images/pushdown/pushdown.en.png b/website/docs/query/insight/images/pushdown/pushdown.en.png
deleted file mode 100644
index 03ca97430c..0000000000
Binary files a/website/docs/query/insight/images/pushdown/pushdown.en.png and /dev/null differ
diff --git a/website/docs/query/insight/images/pushdown/sorting.en.png b/website/docs/query/insight/images/pushdown/sorting.en.png
deleted file mode 100644
index 0023cf771f..0000000000
Binary files a/website/docs/query/insight/images/pushdown/sorting.en.png and /dev/null differ
diff --git a/website/docs/query/insight/images/spec/1.png b/website/docs/query/insight/images/spec/1.png
deleted file mode 100644
index 4f157e6436..0000000000
Binary files a/website/docs/query/insight/images/spec/1.png and /dev/null differ
diff --git a/website/docs/query/insight/images/spec/4.png b/website/docs/query/insight/images/spec/4.png
deleted file mode 100644
index 0b3debbd4f..0000000000
Binary files a/website/docs/query/insight/images/spec/4.png and /dev/null differ
diff --git a/website/docs/query/insight/images/spec/5.png b/website/docs/query/insight/images/spec/5.png
deleted file mode 100644
index c61eb6241b..0000000000
Binary files a/website/docs/query/insight/images/spec/5.png and /dev/null differ
diff --git a/website/docs/query/insight/images/spec/6.png b/website/docs/query/insight/images/spec/6.png
deleted file mode 100644
index bf34980769..0000000000
Binary files a/website/docs/query/insight/images/spec/6.png and /dev/null differ
diff --git a/website/docs/query/insight/insight.md b/website/docs/query/insight/insight.md
deleted file mode 100644
index 58894a6d6c..0000000000
--- a/website/docs/query/insight/insight.md
+++ /dev/null
@@ -1,99 +0,0 @@
----
-title: Execute SQL Query in Web UI
-language: en
-sidebar_label: Execute SQL Query in Web UI
-pagination_label: Execute SQL Query in Web UI
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - execute sql query in web ui
-draft: false
-last_update:
- date: 08/17/2022
----
-
-
-Open kylin Web UI, click **Query -> Insight** button on the navigation bar, all query-able tables will be listed on the left side of page. Enter SQL in textbox on the right side of page, query result will be shown at the below textbox.
-
-
-
-
-
-### Execute SQL Queries
-
-Enter a select query and click **Run Query**, you will see query results. Note the **Limit** field at the bottom right of the page. If there's no limit clause in your SQL statement, the system will apply a default limit value, which is 500. You can uncheck the checkbox in front of the limit field, if you want to disable the limit utterly.
-
-```sql
-select LO_ORDERDATE, count(*)
-from SSB.P_LINEORDER
-group by LO_ORDERDATE
-```
-
-After query results returned successfully, you can find that the query execution time is about 0.96 seconds, and the query hits the model.
-
-At the same time, you can see that the query ID is followed by an arrow. Click the arrow to open the query page in the Spark UI. On this page, you can easily see the SQL execution in Spark.
-
-
-
-When you need to optimize for slow queries, you should analyze the query's specific execution steps and locate the reasons. It would help if you hovered the mouse over the duration to see the current query's detailed execution steps and duration.
-
-
-
-> **Note**:
->
-> 1. Only **SELECT** queries are supported.
-> 2. When query pushdown is enabled, queries that cannot be served by model (index group) will be routed to the pushdown engine for execution. In this case, it will take longer to return and the query may be answered by Hive.
-> 3. If the query does not need Spark calculation, such as hitting the query cache, constant query, etc. There will be no arrow followed by the query ID.
-> 4. When the query uses tiered storage, the total scan counts needs to be obtained manually.
-
-### Stop query
-
-After clicking the **Run Query** button, click the **Stop** button in the same position to stop the query.
-
-
-
-After the query is stopped, query ID and error message will be displayed.
-
-
-
-
-In addition, clicking the **Close** button of the query will also stop the query.
-
-### Save Query
-
-User could click **Save SQL** button at bottom right corner to save queries, the queries are associated with the current user. Click the **Save Query** button below the SQL Editor and you will be prompted to enter a *Query Name* and a *Description* in the pop-up window to save the query.
-
-
-
-### Saved Query
-Click the **Saved Queries** button at the top right of the SQL Editor to view all saved queries. A list of saved queries will be shown in the pop-up window. You can check the box in front of the query and click the **Run Query** button to re-execute.
-
-
-
-
-
-### Query Result
-
-kylin displays query result in table by default. You can search for the query content in the **Filter box** at the top right of the query result, which is a fuzzy search. If you enter `1992`, each line in the query result will contain `1992`, as shown below is the daily order volume in year 1992. You can also export query results to a CSV file.
-
-
-
-
-
-### Query Visualization
-
-In addition to tables, kylin also supports visualization of query results for quick insight.
-
-Support chart type: Line Chart, Bar Chart, Pie Chart.
-
-
-
-### Other ways to execute SQL queries
-
-- [Integration with BI tools](../../integration/intro.md)(Details doc will come soon.)
-
-### Notices
-
-- If a query can be answered by both index and snapshot, snapshot answers the query.
diff --git a/website/docs/query/insight/intro.md b/website/docs/query/insight/intro.md
deleted file mode 100644
index eea6bba7ff..0000000000
--- a/website/docs/query/insight/intro.md
+++ /dev/null
@@ -1,47 +0,0 @@
----
-title: Basic Query Execution
-language: en
-sidebar_label: Basic Query Execution
-pagination_label: Basic Query Execution
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - basic query execution
-draft: false
-last_update:
- date: 08/17/2022
----
-
-
-kylin offers an Intelligent OLAP Platform for big data to simplify multidimensional analytics. kylin finishes data loading and precomputation with the index building jobs and delivers sub-second query latencydelivers sub-second query latency on massive dataset.
-
-Unlike the execution process of regular queries, kylin will be using precalculated data to answer queries instead of doing the calculation online, which will improve query performance significantly.
-
-### Query Execution Process with Precalculation
-
-Different from regular query engines, kylin uses precalculated results to replace real time calculation, in order to improve the query performance and concurrency. A simplified version of query execution process can be described as below:
-
-1. Parse SQL statement and extract all the `FROM` clauses.
-
-2. Find the **matching** and **minimum cost** model for each `FROM` clause.
-
- The **matching** here means:
-
- * The relationship of tables used in `FROM` clause must match the fact and dimension tables defined in models. Please note that the relationship of `LEFT JOIN` does not match `INNER JOIN`.
- * For aggregate queries, the columns in `GROUP BY` clause must be defined as dimensions in models. Meanwhile, the aggregate functions in `SELECT` clause must be defined as measures in models.
- * For non-aggregate queries, table index must be defined in models and all columns appeared in query must be contained in the table index.
-
- The **minimum cost** here means that kylin will automatically select the minimum cost index if there are multiple matching indices. For example, table index can also serve aggregate queries, but its cost is high because of the real time calculation. Therefore, using table index to answer aggregate query is always the last option and only happens when all aggregate indices cannot match.
-
-3. If all the `FROM` clauses match successfully, kylin will execute the query using index data.
-
- All the `FROM` clauses will be replaced by precalculated results, and the query will execute from there to get the final result. If you execute queries via Web UI, you can find the name(s) of the answering model(s) in the **Answered By** field after a query returns successfully. For more details, please refer to [Execute SQL Query in Web UI](insight.md).
-
-4. If there is one or more `FROM` clause cannot find a matching index, then kylin cannot execute the query using index data.x
-
- The query will fail with an error message of `no model found` or `no realization found`. This means the data required for this query does not exist in the system.
-
- As a special case, if the pushdown engine is enabled, then kylin will not report error, and instead route this query to the pushdown engine. For more details, please refer to [Query Pushdown](../../query/pushdown/intro.md).
-
diff --git a/website/docs/query/insight/operator_function/function/aggregate_function.md b/website/docs/query/insight/operator_function/function/aggregate_function.md
deleted file mode 100644
index 76b1796cd1..0000000000
--- a/website/docs/query/insight/operator_function/function/aggregate_function.md
+++ /dev/null
@@ -1,27 +0,0 @@
----
-title: Aggregate Functions
-language: en
-sidebar_label: Aggregate Functions
-pagination_label: Aggregate Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - aggregate functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-
-| Syntax | Description | Example | Normal Query | Pushdown Query | Defined as Computed Column | Suggested as Computed Column |
-| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------ | -------------- | -------------------------- | ---------------------------- |
-| AVG(numeric) | Returns the average (arithmetic mean) of *numeric* across all input values | `SELECT AVG(PRICE) FROM KYLIN_SALES` <br /> = 49.23855638491023 | ✔️ | ✔️ | ❌ | ❌ |
-| SUM(numeric) | Returns the sum of *numeric* across all input values | `SELECT SUM(PRICE) FROM KYLIN_SALES`<br /> = 244075.5240 | ✔️ | ✔️ | ❌ | ❌ |
-| MAX(value) | Returns the maximum value of *value* across all input values | `SELECT MAX(PRICE) FROM KYLIN_SALES`<br /> = 99.9865 | ✔️ | ✔️ | ❌ | ❌ |
-| MIN(value) | Returns the minimum value of *value* across all input values | `SELECT MIN(PRICE) FROM KYLIN_SALES`<br /> = 0.0008 | ✔️ | ✔️ | ❌ | ❌ |
-| COUNT(value) | Returns the number of input rows for which *value* is not null (wholly not null if *value* is composite) | `SELECT count(PRICE) FROM KYLIN_SALES` <br /> = 4957 | ✔️ | ✔️ | ❌ | ❌ |
-| COUNT(*) | Returns the number of input rows | `SELECT COUNT(*) FROM KYLIN_COUNTRY`<br /> = 244 | ✔️ | ✔️ | ❌ | ❌ |
-| CORR(value1, value2) | Returns the correlation of two columns | `SELECT CORR(ITEM_COUNT, PRICE) FROM KYLIN_SALES`<br /> = 0.1278 | ✔️ | ✔️ | ❌ | ❌ |
-
diff --git a/website/docs/query/insight/operator_function/function/arithmetic_function.md b/website/docs/query/insight/operator_function/function/arithmetic_function.md
deleted file mode 100644
index 63c2f10a5d..0000000000
--- a/website/docs/query/insight/operator_function/function/arithmetic_function.md
+++ /dev/null
@@ -1,58 +0,0 @@
----
-title: Arithmetic Functions
-language: en
-sidebar_label: Arithmetic Functions
-pagination_label: Arithmetic Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - arithmetic functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-| Syntax | Description | Example | Normal Query | Pushdown Query | Defined as Computed Column | Suggested as Computed Column |
-| ------------------------------ | ------------------------------------------------------------ | ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | -- |
-| ABS(numeric) | Returns the absolute value of *numeric* | `ABS(-2)` = 2 | ✔️ | ✔️ | ✔️ | ✔️ |
-| CEIL(numeric) | Rounds *numeric* up, returning the smallest integer that is greater than or equal to *numeric* | ` CEIL(-2.2)` = -2 | ✔️ | ✔️ | ✔️ | ✔️ |
-| FLOOR(numeric) | Rounds *numeric* down, returning the largest integer that is less than or equal to *numeric* | ` FLOOR(-2.2)` = -3 | ✔️ | ✔️ | ✔️ | ✔️ |
-| MOD(numeric1, numeric2) | Returns the remainder (modulus) of *numeric1* divided by *numeric2*. The result is negative only if *numeric1* is negative | `MOD(-3, 2)` = -1 | ✔️ | ✔️ | ❌ | ❌ |
-| SQRT(numeric) | Returns the square root of *numeric* | `SQRT(16)` = 4.0 | ✔️ | ✔️ | ✔️ | ❌ |
-| CBRT(numeric) | Returns the cube root of *numeric*. | ` CBRT(27.0)` = 3.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| HYPOT(numeric1, numeric2) | Returns  | ` HYPOT(3, 4)` = 5.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| LN(numeric) | Returns the natural logarithm (base *e*) of *numeric* | ` LN(2)` = 0.6931471805599453 | ✔️ | ✔️ | ✔️ | ✔️ |
-| LOG(base, numeric) | Returns the logarithm of *numeric* with *base*. | ` LOG(10, 100)` = 2.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| LOG10(numeric) | Returns the base 10 logarithm of *numeric* | ` LOG10(100)` = 2.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| LOG1P(numeric) | Returns ln(1 + *numeric*). | ` LOG1P(0)` = 0.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| LOG2(numeric) | Returns the logarithm of *numeric* with base 2. | ` LOG2(2)` = 1.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| EXP(numeric) | Returns *e* raised to the power of *numeric* | ` EXP(1)` = 2.718281828459045 | ✔️ | ✔️ | ✔️ | ✔️ |
-| EXPM1(numeric) | Returns exp(*numeric*) - 1. | ` EXPM1(0)` = 0.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| POWER(numeric1, numeric2) | Returns *numeric1* raised to the power of *numeric2* | `POWER(5,2)` = 25.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| RAND([seed]) | Generates a random double between 0 and 1 inclusive, optionally initializing the random number generator with *seed* | ` RAND(15)` = 0.45951471073476047 | ❌ | ✔️ | ❌ | ❌ |
-| COS(numeric) | Returns the cosine of *numeric* | ` COS(5)`= 0.28366218546322625 | ✔️ | ✔️ | ✔️ | ✔️ |
-| SIN(numeric) | Returns the sine of *numeric* | ` SIN(5)`= -0.9589242746631385 | ✔️ | ✔️ | ✔️ | ✔️ |
-| TAN(numeric) | Returns the tangent of *numeric* | ` TAN(5)` = -3.380515006246586 | ✔️ | ✔️ | ✔️ | ✔️ |
-| COT(numeric) | Returns the cotangent of *numeric* | ` COT(5)` = -0.2958129155327455 | ✔️ | ✔️ | ✔️ | ✔️ |
-| ACOS(numeric) | Returns the arc cosine of *numeric* | ` ACOS(0.8)` = 0.6435011087932843 | ✔️ | ✔️ | ✔️ | ✔️ |
-| ASIN(numeric) | Returns the arc sine of *numeric* | ` ASIN(0.8)` = 0.9272952180016123 | ✔️ | ✔️ | ✔️ | ✔️ |
-| ATAN(numeric) | Returns the arc tangent of *numeric* | ` ATAN(0.8)` = 0.6747409422235527 | ✔️ | ✔️ | ✔️ | ✔️ |
-| ATAN2(numeric1, numeric2) | Returns the arc tangent of the *numeric*coordinates | ` ATAN2(0.2, 0.8)` = 0.24497866312686414 | ✔️ | ✔️ | ✔️ | ✔️ |
-| COSH(numeric) | Returns the hyperbolic cosine of *numeric* | ` COSH(0)` = 1.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| SINH(numeric) | Returns hyperbolic sine of *numeric* | ` SINH(0)` = 0.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| TANH(numeric) | Returns the hyperbolic tangent of *numeric* | ` TANH(0)` = 0.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| DEGREES(numeric) | Converts *numeric* from radians to degrees | ` DEGREES(5)` = 286.4788975654116 | ✔️ | ✔️ | ✔️ | ✔️ |
-| PI | Returns a value that is closer than any other value to *pi* | ` PI` = 3.141592653589793 | ✔️ | ❌ | ❌ | ❌ |
-| RADIANS(numeric) | Converts *numeric* from degrees to radians | ` RADIANS(90)`= 1.5707963267948966 | ✔️ | ✔️ | ✔️ | ✔️ |
-| BROUND(numeric1, int1) | Returns *numeric1* rounded to *int1* decimal places using HALF_EVEN rounding mode. | ` BROUND(2.5, 0)` = 2.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| ROUND(numeric1, int1) | Returns *numeric1* rounded to *int1* decimal places using HALF_UP rounding mode. | ` ROUND(2.5, 0) =` = 3 | ✔️ | ✔️ | ✔️ | ✔️ |
-| RINT(numeric) | Returns the double value that is closest in value to the argument and is equal to a mathematical integer. | ` RINT(12.3456)` = 12.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| SIGN(numeric) | Returns the signum of *numeric* | ` SIGN(-5)` = -1.0 | ✔️ | ✔️ | ✔️ | ✔️ |
-| CONV(numeric, from_base, to_base) | Convert *numeric* from base *from_base* to base *to_base*. | ` CONV(-10, 16, -10)` = -16 | ✔️ | ✔️ | ✔️ | ✔️ |
-| CONV(string, from_base, to_base) | Convert *numeric* (type string) from base *from_base* to base *to_base*. | ` CONV('100', 2, 10)`= 4 | ✔️ | ✔️ | ✔️ | ✔️ |
-| TRUNCATE(numeric1, numeric2) | Truncates *numeric1* to optionally *numeric2*(if not specified 0) places right to the decimal point | ` TRUNCATE(5.55555,2)`= 5.5 | ✔️ | ✔️ | ✔️ | ✔️ |
-| FACTORIAL(numeric) | Returns the factorial of *numeric*. expr is [0..20]. Otherwise, null. | ` FACTORIAL(5)` = 120 | ✔️ | ✔️ | ✔️ | ✔️ |
-
-**Notice**: if the parameter of the `POWER` function is a constant conversion, like `CAST(2 AS DOUBLE)`, it may fail to be recommended as computed column.
diff --git a/website/docs/query/insight/operator_function/function/bitmap_function.md b/website/docs/query/insight/operator_function/function/bitmap_function.md
deleted file mode 100644
index 044cd7b232..0000000000
--- a/website/docs/query/insight/operator_function/function/bitmap_function.md
+++ /dev/null
@@ -1,155 +0,0 @@
----
-title: Bitmap Function
-language: en
-sidebar_label: Bitmap Function
-pagination_label: Bitmap Function
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - bitmap function
-draft: false
-last_update:
- date: 08/17/2022
----
-
-Users can use bitmap functions to operate de-duplication based on bitmap. Then find the intersection of the result bitmaps.
-
-Kylin supports following bitmap functions,
-
-
-
-### Prerequisites
-
-Kylin version is 5.0 or higher.
-
-
-### BITMAP_UUID
-
-- Description
-
- - Return a string which points to a hidden serialized bitmap. The bitmap contains de-duplicated values and can be an input to other bitmap functions.
-
-- Syntax
-
- - `bitmap_uuid(column_to_count)`
-
-- Parameters
-
- - `column_to_count` , the column to be calculated and applied on distinct value, required to be added as **Precise count distinct** measure.
-
-- Query Example 1
-
- ```select bitmap_uuid(LO_CUSTKEY) from SSB.P_LINEORDER where LO_ORDERDATE=date'2012-01-01'```
-
-- Response Example 1
-
- 
-
- Return a string which points to a hidden serialized bitmap. The bitmap result is the de-duplicated seller id set of online transactions on New Year's Day. The bitmap can be used as an input to other bitmap functions.
-
-### INTERSECT_BITMAP_UUID
-
-- Description
-
- - Return a string which points to a hidden serialized bitmap. The bitmap contains the result of finding intersection based on filter column, and then de-duplicating based on count column.
-
-- Syntax
-
- - `intersect_bitmap_uuid(column_to_count, column_to_filter, filter_value_list)`
-
-- Parameters
-
- - `column_to_count` , the column to be calculated and applied on distinct value required to be added as **Precise count distinct** measure.
- - `column_to_filter`, the varied dimension.
- - `filter_value_list`, the value of the varied dimensions listed in `array[]`, When `column_to_filter` is of type varchar, A single element in an array can map multiple values. By default, the '|' is split. You can set `kylin.query.intersect.separator` in `kylin.properties` to configure the separator, Can take value '|' or ',', default is '|'(Currently this parameter does not support the use of subquery results as parameters).
-
-> **Note:** When the data type of a varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
-> `select intersect_bitmap_uuid(column_to_count, column_to_filter, array[cast(3.53 as double), cast(5.79 as double)]) from ...`
-> OR `select intersect_bitmap_uuid(column_to_count, column_to_filter, array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45']) from ...`
-
-- Query Example 1
-
- LSTG_FORMAT_NAME is a column of VARCHAR(4096) varied dimension.
-
- ```
- select intersect_bitmap_uuid(
- LO_CUSTKEY, LO_SHIPMODE,
- array['AIR', 'Others'])
- from SSB.P_LINEORDER
- ```
-
-- Response Example 1
-
- 
-
- Return a string which points to a hidden serialized bitmap. The bitmap result is the de-duplicated seller id set who have transactions in either type 'FP-GTC' and 'Others', or type 'FP-non GTC' or 'Others' on New Year's Day. The bitmap can be used as an input to other bitmap functions.
-
-### INTERSECT_BITMAP_UUID_V2
-
-- Description
- - Return a string which points to a hidden serialized bitmap. The bitmap contains the result of finding intersection based on filter column, and then de-duplicating based on count column. Support Regexp in condition.
-- Syntax
- - `intersect_bitmap_uuid_v2(column_to_count, column_to_filter, filter_value_list, filter_type)`
-- Parameters
- - `column_to_count` , the column to be calculated and applied on distinct value required to be added as **Precise count distinct** measure.
- - `column_to_filter`, the varied dimension.
- - `filter_value_list`, the value of the varied dimensions listed in `array[]`,
- - `filter_type`, the data type is String, which identifies the filter mode. There are currently two optional values "RAWSTRING" and "REGEXP". When the parameter value is "RAWSTRING", the filtering mode is precise filtering. When `column_to_filter` is a Varchar type, A single element in the array can be mapped with multiple values. By default, it is separated by '|'. You can use `kylin.query.intersect.separator` to configure the separator. And only support configuration in the `kylin.pr [...]
-
-> **Note:** When the filter_type is "RAWSTRING" and the data type of a varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
-> `select intersect_bitmap_uuid_v2(column_to_count, column_to_filter, array[cast(3.53 as double), cast(5.79 as double)], 'RAWSTRING') from TEST_TABLE`
-> 或 `select intersect_bitmap_uuid_v2(column_to_count, column_to_filter, array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45'], 'RAWSTRING') from TEST_TABLE;`
-
-- Query Example 1
-
- LSTG_FORMAT_NAME is a column of VARCHAR(4096) varied dimension.
-
- ```
- select intersect_bitmap_uuid_v2(
- LO_CUSTKEY, LO_SHIPMODE,
- array['A*R', 'Other.*'], 'REGEXP')
- from SSB.P_LINEORDER
- ```
-
-- Response Example 1
-
- 
-
- Return a string which points to a hidden serialized bitmap. The regular expression can match 'FP-GTC', 'FP-non GTC' and 'Others', The bitmap result is the de-duplicated seller id set who have transactions in either type 'FP-GTC' and 'Others', or type 'FP-non GTC' or 'Others' on New Year's Day. The bitmap can be used as an input to other bitmap functions.
-
-### INTERSECT_COUNT_BY_COL
-
-- Description
-
- - Find the intersection of the serialized input bitmaps. Then return the distinct count.
-
-- Syntax
-
- - `intersect_count_by_col(Array[t1.c1,t2.c2 ...])`
-
-- Parameters
-
- - `t1.c1, t2.c2 ...`, the list of input columns. Each column points to a serialized bitmap hidden from users. Function `bitmap_uuid` and `intersect_bitmap_uuid` and `intersect_bitmap_uuid_v2` can return the bitmap.
-
-- Query Example 1
-
- ```
- select intersect_count_by_col(Array[t1.a1,t2.a2]) from
- (select bitmap_uuid(LO_CUSTKEY) as a1
- from SSB.P_LINEORDER) t1,
- (select intersect_bitmap_uuid(
- LO_CUSTKEY, LO_SHIPMODE,
- array['AIR', 'Others']) as a2
- from SSB.P_LINEORDER) t2
- ```
-
-- Response Example 1
-
- 
-
- Function `bitmap_uuid` and `intersect_bitmap_uuid` return two serialized bitmap. `intersect_count_by_col` then find the intersection on two bitmaps and return distinct count.
-
-### Limitations
-- All the above functions don't support pushdown query
diff --git a/website/docs/query/insight/operator_function/function/conditional_function.md b/website/docs/query/insight/operator_function/function/conditional_function.md
deleted file mode 100644
index c72d5b7b0c..0000000000
--- a/website/docs/query/insight/operator_function/function/conditional_function.md
+++ /dev/null
@@ -1,25 +0,0 @@
----
-title: Conditional Functions
-language: en
-sidebar_label: Conditional Functions
-pagination_label: Conditional Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - conditional functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-| Syntax | Description | Example | Normal Query | Pushdown Query | Defined as Computed Column | Suggested as Computed Column |
-| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------ | -------------- | -------------------------- | ------------------------- |
-| CASE value WHEN value1 THEN result1 WHEN valueN THEN resultN ELSE resultZ END | Simple case | `CASE OPS_REGION WHEN 'Beijing' THEN 'BJ' WHEN 'Shanghai' THEN 'SH'WHEN 'Hongkong' THEN 'HK' END FROM KYLIN_SALES` <br /> = HK SH BJ | ✔️ | ✔️ | ✔️ | ✔️ |
-| CASE WHEN condition1 THEN result1 WHEN conditionN THEN resultN ELSE resultZ END | Searched case | `CASE WHEN OPS_REGION='Beijing'THEN 'BJ' WHEN OPS_REGION='Shanghai' THEN 'SH' WHEN OPS_REGION='Hongkong' THEN 'HK' END FROM KYLIN_SALES`<br /> = HK SH BJ | ✔️ | ✔️ | ✔️ | ✔️ |
-| NULLIF(value, value) | Return NULL if the values are the same. Otherwise, return the first value. | `NULLIF(5,5)`<br /> = null | ✔️ | ✔️ | ✔️ | ✔️ |
-| COALESCE(value, value [, value ]*) | Return the first not null value. | `COALESCE(NULL,NULL,5)`<br /> = 5 | ✔️ | ✔️ | ✔️ | ✔️ |
-| IFNULL(value1, value2) | Return value2 if value1 is NULL. Otherwise, return value1. | `IFNULL('kylin','apache')`<br /> = 'kylin' | ✔️ | ✔️ | ✔️ | ✔️ |
-| ISNULL(value) | Return true if value is NULL. Otherwise, return false. | `ISNULL('kylin')` <br /> = false | ✔️ | ✔️ | ✔️ | ✔️ |
-| NVL(value1, value2) | Return value2 if value1 is NULL. Otherwise, return value1. Value1, value2 must have same data type. | `NVL('kylin','apache')`<br /> = 'kylin' | ✔️ | ✔️ | ✔️ | ✔️ |
diff --git a/website/docs/query/insight/operator_function/function/datetime_function.md b/website/docs/query/insight/operator_function/function/datetime_function.md
deleted file mode 100644
index 60748a0f96..0000000000
--- a/website/docs/query/insight/operator_function/function/datetime_function.md
+++ /dev/null
@@ -1,46 +0,0 @@
----
-title: Date and Time Functions
-language: en
-sidebar_label: Date and Time Functions
-pagination_label: Date and Time Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - date functions
- - time functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-| Syntax | Description | Example | Normal Query | Pushdown Query | Defined as Computed Column | Suggested as Computed Column |
-| ----------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------ | -------------- | -------------------------- | ---------------------------- |
-| CURRENT_DATE | Returns the current date in the session time zone, in a value of datatype DATE | ` CURRENT_DATE`<br /> = 2018-10-10 | ✔️ | ✔️ | ✔️ | ✔️ |
-| CURRENT_TIMESTAMP | Returns the current timestamp in the session time zone, in a value of datatype timestamp | ` CURRENT_TIMESTAMP`<br /> = 2022-07-19 10:24:44.708 | ✔️ | ✔️ | ✔️ | ✔️ |
-| EXTRACT(timeUnit FROM datetime) | Extracts and returns the value of a specified datetime field from a datetime value expression | `EXTRACT(minute FROM timestamp'2018-10-10 11:47:16')`<br /> = 47 | ✔️ | ✔️ | ✔️ | ❌ |
-| FLOOR(datetime TO timeUnit) | Rounds *datetime* down to *timeUnit* where *timeunit* can be `year`,`quarter`, `month`, `week`, `day`, `hour`, `minute`, `second` | Example 1:<br/>`FLOOR(timestamp'2018-10-10 11:47:16' TO year)`<br/>= 2018-01-01 00:00:00<br/>Example 2:<br/>`FLOOR(timestamp'2018-10-10 11:47:16' TO minute)`<br/>= 2018-10-10 11:47:00 | ✔️ | ✔️ | ✔️ | ✔️ |
-| CEIL(datetime TO timeUnit) | Rounds *datetime* up to *timeUnit* where *timeunit* can be `year`,`quarter`, `month`, `week`, `day`, `hour`, `minute`, `second` | Example 1:<br/>`CEIL(timestamp'2018-10-10 11:47:16' TO year)`<br/>= 2019-01-01 00:00:00<br / >Example 2:<br/>`CEIL(timestamp'2018-10-10 11:47:16' TO minute)`<br/>= 2018-10-10 11:48:00 | ✔️ | ✔️ | ✔️ | ✔️ |
-| YEAR(date) | Equivalent to `EXTRACT(YEAR FROM date)`. Returns an integer. | ` YEAR(date '2019-01-02')`<br /> = 2019 | ✔️ | ✔️ | ✔️ | ✔️ |
-| QUARTER(date) | Equivalent to `EXTRACT(QUARTER FROM date)`. Returns an integer between 1 and 4. | ` QUARTER(date '2019-01-02')` <br /> = 1 | ✔️ | ✔️ | ✔️ | ✔️ |
-| NOW(date) | Returns the current timestamp at the start of query evaluation. | ` NOW()` <br /> = 2019-09-24 17:19:09.932 | ❌ | ✔️ | ✔️ | ✔️ |
-| MONTH(date) | Equivalent to `EXTRACT(MONTH FROM date)`. Returns an integer between 1 and 12. | ` MONTH(date '2019-01-02')`<br /> = 1 | ✔️ | ✔️ | ✔️ | ✔️ |
-| WEEK(date) | Equivalent to `EXTRACT(WEEK FROM date)`. Returns an integer between 1 and 53. | ` WEEK(date '2019-01-02')`<br /> = 1 | ✔️ | ✔️ | ✔️ | ✔️ |
-| DAYOFYEAR(date) | Equivalent to `EXTRACT(DOY FROM date)`. Returns an integer between 1 and 366. | `DAYOFYEAR(date '2019-10-03')`<br /> = 276 | ✔️ | ✔️ | ✔️ | ✔️ |
-| DAYOFMONTH(date) | Equivalent to `EXTRACT(DAY FROM date)`. Returns an integer between 1 and 31. | ` DAYOFMONTH(date '2019-10-03')`<br /> = 3 | ✔️ | ✔️ | ✔️ | ✔️ |
-| DAYOFWEEK(date) | Equivalent to `EXTRACT(DOW FROM date)`. Returns an integer between 1 and 7. | ` DAYOFWEEK(date '2019-10-03')`<br /> = 5 | ✔️ | ✔️ | ✔️ | ✔️ |
-| HOUR(date) | Equivalent to `EXTRACT(HOUR FROM date)`. Returns an integer between 0 and 23. | ` HOUR(timestamp '2019-01-02 14:01:50')`<br /> = 14 | ✔️ | ✔️ | ✔️ | ✔️ |
-| MINUTE(date) | Equivalent to `EXTRACT(MINUTE FROM date)`. Returns an integer between 0 and 59. | ` MINUTE(timestamp '2019-01-02 14:01:50')`<br /> = 1 | ✔️ | ✔️ | ✔️ | ✔️ |
-| SECOND(date) | Equivalent to `EXTRACT(SECOND FROM date)`. Returns an integer between 0 and 59. | ` SECOND(timestamp '2019-01-02 14:01:50')`<br /> = 50 | ✔️ | ✔️ | ✔️ | ✔️ |
-| TIMESTAMPADD(timeUnit, integer, datetime) | Returns *datetime* with an interval of (signed) *integer* *timeUnit*s added. Equivalent to `datetime + INTERVAL 'integer' timeUnit` | Example 1: to get the next month<br />` TIMESTAMPADD(month, 1, CURRENT_DATE)`<br /> = 2018-11-10<br /><br />Example 2: to get the last day of this month<br />`TIMESTAMPADD(day, -(extract(day from CURRENT_DATE)), timestampadd(month,1,CURRENT_DATE))`<br /> = 2018-10-31 | ✔️ | ✔️ | ✔️ [...]
-| TRUNC(date, fmt) | Returns `date` with the time portion of the day truncated to the unit specified by the format model `fmt`.`fmt` should be one of ["year", "yyyy", "yy", "mon", "month", "mm"] | `TRUNC(date '2009-02-12', 'MM')`<br /> = 2009-02-01 | ✔️ | ✔️ | ✔️ | ✔️ |
-| ADD_MONTHS(start_date, num_months) | Returns the date that is `num_months` after `start_date`. | ` ADD_MONTHS(date '2016-08-31', 1) `<br /> = 2016-09-30 | ✔️ | ✔️ | ✔️ | ✔️ |
-| DATE_ADD(start_date, num_days) | Returns the date that is `num_days` after `start_date`. | ` DATE_ADD(date '2016-07-30', 1)`<br /> = 2016-07-31 | ✔️ | ✔️ | ✔️ | ✔️ |
-| DATE_SUB(start_date, num_days) | Returns the date that is `num_days` before `start_date`. | ` DATE_SUB(date '2016-07-30', 1)`<br /> = 2016-07-29 | ✔️ | ✔️ | ✔️ | ✔️ |
-| FROM_UNIXTIME(unix_time, format) | Returns `unix_time` in the specified `format`. | `FROM_UNIXTIME(0, 'yyyy-MM-dd HH:mm:ss')`<br /> = 1970-01-01 00:00:00 | ✔️ | ✔️ | ✔️ | ✔️ |
-| FROM_UTC_TIMESTAMP(timestamp, timezone) | Given a timestamp like '2017-07-14 02:40:00.0', interprets it as a time in UTC, and renders that time as a timestamp in the given time zone. | ` FROM_UTC_TIMESTAMP('2016-08-31', 'Asia/Seoul')`<br /> = 2016-08-31 09:00:00 | ✔️ | ✔️ | ✔️ | ✔️ |
-| MONTHS_BETWEEN(timestamp1, timestamp2) | If `timestamp1` is later than `timestamp2`, then the result is positive. If `timestamp1` and `timestamp2` are on the same day of month, or both are the last day of month, time of day will be ignored. Otherwise, the difference is calculated based on 31 days per month. | ` MONTHS_BETWEEN('1997-02-28 10:30:00', '1996-10-30')`<br /> = 3.94959677 | ✔️ | ✔️ | ✔️ | ✔️ |
-| TO_UTC_TIMESTAMP(timestamp, timezone) | Given a timestamp like '2017-07-14 02:40:00.0', interprets it as a time in the given time zone, and renders that time as a timestamp in UTC. | `FROM_UTC_TIMESTAMP(TIMESTAMP'2015-03-02 06:05:00', 'America/Toronto')`<br /> = 2015-03-02 01:05:00.0 | ✔️ | ❌ | ✔️ | ✔️ |
-| UNIX_TIMESTAMP(datetime, format) | Returns the seconds from `1970-01-01 08:00:00` to `datetime`. Please specify the `datetime` as `format` format | `UNIX_TIMESTAMP('2016-04-08 09:00:00', 'yyyy-MM-dd HH:mm:ss')`<br /> = 1460106000 | ✔️ | ✔️ | ✔️ | ✔️ |
-| DATEDIFF(endDate, startDate) | Returns the number of days from `startDate` to `endDate` | DATEDIFF(date '2022-02-03', date '2022-02-01')<br/>= 2 | ✔️ | ✔️ | ✔️ | ❌ |
diff --git a/website/docs/query/insight/operator_function/function/grouping_function.md b/website/docs/query/insight/operator_function/function/grouping_function.md
deleted file mode 100644
index cbe2801ff9..0000000000
--- a/website/docs/query/insight/operator_function/function/grouping_function.md
+++ /dev/null
@@ -1,95 +0,0 @@
----
-title: Grouping Function
-language: en
-sidebar_label: Grouping Function
-pagination_label: Grouping Function
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - grouping function
-draft: false
-last_update:
- date: 08/17/2022
----
-
-Users can use grouping function to aggregate data grouping by different keys in one SQL statement. ROLLUP, CUBE, GROUPING SETS functions are common grouping and aggregate methods.
-
-> **Note:** Grouping function is not supported to be defined or recommended as computed columns in current version.
-
-### GROUPING SETS(expression)
-
-In a result set, you sometimes need to aggregate columns A and B separately, and also aggregate the two columns together. The implementation method is often to use multiple UNION ALL statements. However, the GROUPING SETS function can use different grouping settings for aggregate queries at the same time. It can replace multiple UNION ALL statements, making SQL statements more convenient and efficient.
-
-- Description
-
- - The GROUPING SETS function is often used in the GROUP BY clause. The expression is filled with the combination of dimensions that need to be grouped. For example, GROUPING SETS ((A, B), (C), ()) means to do aggregation with both columns A and B, aggregation with column C and aggregation with no grouping.
-- Query Example
-
-```SQL
-SELECT
- LO_CUSTKEY,
- LO_ORDERKEY,
- SUM(LO_ORDTOTALPRICE) AS PRICE
-FROM SSB.P_LINEORDER
-GROUP BY
- GROUPING SETS((LO_CUSTKEY,LO_ORDERKEY),(LO_ORDERKEY),());
-```
-
-- Result Example
-
-
-
-### CUBE(expression) 和 ROLLUP(expression)
-
-CUBE and ROLLUP functions can be considered special cases of GROUPING SETS.
-
-- Description
- - CUBE will do group aggregation with all columns, and finally give the total aggregation result. The columns used in the expression are parsed into all possible combinations. For example, GROUP BY CUBE (a, b, c) is equivalent to GOUPING SETS ((a, b, c), (a, b), (a, c), (b, c), (a), (b) , (c), ())
- - ROLLUP will do group aggregation with the first column, and finally give the total aggregation. The columns used in the expression will be parsed into a combination form containing levels. For example, GROUP BY ROLLUP (a, b, c) is equivalent to GROUPING SETS ((a, b, c), (a, b), (a), ())
-- Query Example (Here ROLLUP is taken as an example)
-
-```SQL
-SELECT
- LO_CUSTKEY,
- LO_ORDERKEY,
- SUM(LO_ORDTOTALPRICE) AS PRICE
-FROM SSB.P_LINEORDER
-GROUP BY
- ROLLUP(LO_CUSTKEY, LO_ORDERKEY);
-```
-
-- Result Example
-
-
-
-
-
-### GROUPING(expression)
-
-In the results created using the grouping functions, NULL is used as a placeholder, so when you view the results, you cannot distinguish between NULL as a placeholder or the original data.
-
-The GROUPING function distinguishes the placeholder NULL from the NULL in the original data.
-
-- Description
- - The grouping columns involved in the grouping function can be used in the expression of the GROUPING function. If the function returns a value of 0, it means that the NULL displayed under the grouping column in the corresponding row is from the original data. If it returns 1, it means that the NULL displayed under the grouping column in the corresponding row is a placeholder generated by the grouping function.
-- Query Example
-
-```SQL
-SELECT
- LO_CUSTKEY,
- LO_ORDERKEY,
- SUM(LO_ORDTOTALPRICE) AS PRICE,
- GROUPING(LO_CUSTKEY) AS GC,
- GROUPING(LO_ORDERKEY) AS GM
-FROM SSB.P_LINEORDER
-GROUP BY
- GROUPING SETS((LO_CUSTKEY,LO_ORDERKEY),(LO_ORDERKEY),());
-```
-
-- Result Example:
-
-You can see that the result of the GROUPING function in both columns in the first row is 1, indicating that the NULL in the two columns LO_CUSTKEY and LO_ORDERKEY in this row are placeholders due to the GROUPING SETS function.
-
-
diff --git a/website/docs/query/insight/operator_function/function/images/arithmetic_function.png b/website/docs/query/insight/operator_function/function/images/arithmetic_function.png
deleted file mode 100644
index 6754bf435c..0000000000
Binary files a/website/docs/query/insight/operator_function/function/images/arithmetic_function.png and /dev/null differ
diff --git a/website/docs/query/insight/operator_function/function/intersect_function.md b/website/docs/query/insight/operator_function/function/intersect_function.md
deleted file mode 100644
index 181986bddb..0000000000
--- a/website/docs/query/insight/operator_function/function/intersect_function.md
+++ /dev/null
@@ -1,195 +0,0 @@
----
-title: Intersect Function
-language: en
-sidebar_label: Intersect Function
-pagination_label: Intersect Function
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - intersect function
-draft: false
-last_update:
- date: 08/17/2022
----
-
-
-Users can use intersection function to calculate the value of the intersection of two data sets, with some same dimensions and one varied dimension, to analyze the retention or conversion rates.
-
-kylin supports the following intersection function,
-
-
-
-
-### INTERSECT_COUNT
-
-- Description
-
- - Returns the distinct count of the intersection of multiple result sets in different conditions
-
-- Syntax
-
- - `intersect_count(column_to_count, column_to_filter, filter_value_list)`
-
-- Parameters
-
- - `column_to_count`, the column to be calculated and applied on distinct count, required to be added as **Precise count distinct** measure
- - `column_to_filter`, the varied dimension
- - `filter_value_list`, the value of the varied dimensions listed in `array[]`, When `column_to_filter` is of type varchar, A single element in an array can map multiple values. By default, the '|' is split. You can set `kylin.query.intersect.separator` in `kylin.properties` to configure the separator, Can take value '|' or ',', default is '|'(Currently this parameter does not support the use of subquery results as parameters).
-
-> **Note: ** When the data type of a varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
-> `select intersect_count(column_to_count, column_to_filter, array[cast(3.53 as double), cast(5.79 as double)]) from TEST_TABLE`
-> OR `select intersect_count(column_to_count, column_to_filter, array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45']) from TEST_TABLE;`
-
-- Query Example 1
-
- Take the sample dataset provided by kylin as an example, table `SSB.P_LINEORDER` simulates the online transaction data, and the following query can return the percentile of sellers who are trading day by day during 1992.01.01 to 1992.01.03.
-
- ```SQL
- select LO_SHIPMODE,
- intersect_count(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-01']) as first_day,
- intersect_count(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-02']) as second_day,
- intersect_count(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-03']) as third_day,
- intersect_count(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-01',date'1992-01-02']) as retention_oneday,
- intersect_count(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-01',date'1992-01-02',date'1992-01-03']) as retention_twoday
- from SSB.P_LINEORDER
- where LO_ORDERDATE in (date'1992-01-01',date'1992-01-02',date'1992-01-03')
- group by LO_SHIPMODE
- ```
-
-- Response Example 1
-
- 
-
- The result shows that there is no seller keeps trading constantly during this period.
-
-- Query Example 2
-
- ```sql
- select
- intersect_count(LO_CUSTKEY, LO_SHIPMODE, array['RAIL|SHIP|TRUCK', 'TRUCK']) as test_column
- from SSB.P_LINEORDER
- ```
-
-- Response Example 2
-
- 
-
-### INTERSECT_VALUE
-
-- Description
-
- - Returns the values of the intersection of multiple result sets in different conditions. If the returned result is large, it may cause the analysis page browser to crash.
-
-- Syntax
-
- - `intersect_value(column_to_count, column_to_filter, filter_value_list)`
-
-- Parameters
-
- - `column_to_count`, the column to be calculated and applied on distinct value required to be added as **Precise count distinct** measure. **And only columns of type tinyint, smallint, or integer are supported**.
- - `column_to_filter`, the varied dimension
- - `filter_value_list`, the value of the varied dimensions listed in `array[]`, When `column_to_filter` is of type varchar, A single element in an array can map multiple values. By default, the '|' is split. You can set `kylin.query.intersect.separator` in `kylin.properties` to configure the separator, Can take value '|' or ',', default is '|'(Currently this parameter does not support the use of subquery results as parameters).
-
-> **Note: ** When the data type of a varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
-> `select intersect_value(column_to_count, column_to_filter, array[cast(3.53 as double), cast(5.79 as double)]) from TEST_TABLE`
-> OR `select intersect_value(column_to_count, column_to_filter, array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45']) from TEST_TABLE;`
-
-
-- Query Example 1
-
- Fact table `SSB.P_LINEORDER` simulates the online transaction data. And data type of `LO_CUSTKEY` column is `integer`. The following query can return the ids of sellers who are trading day by day during 1992.01.01 to 1992.01.03.
-
- ```SQL
- select LO_SHIPMODE,
- intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-01']) as first_day,
- intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-02']) as second_day,
- intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-03']) as third_day,
- intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-01',date'1992-01-02']) as retention_oneday,
- intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-01',date'1992-01-02',date'1992-01-03']) as retention_twoday
- from SSB.P_LINEORDER
- where PART_DT in (date'1992-01-01',date'1992-01-02',date'1992-01-03')
- group by LO_SHIPMODE
- ```
-
-- Response Example 1
-
- 
-
- The result shows that set of keeping trading constantly's sellerId during this period.
-
-- Query Example 2
-
- ```sql
- select
- intersect_count(LO_CUSTKEY, LO_SHIPMODE, array['RAIL|SHIP|TRUCK', 'TRUCK']) as test_column
- from SSB.P_LINEORDER
- ```
-
-- Response Example 2
-
- 
-
-### INTERSECT_COUNT_V2
-
-- Description
- - Returns the distinct count of the intersection of multiple result sets in different conditions. Support Regexp in condition.
-- Syntax
- - `intersect_count_v2(column_to_count, column_to_filter, filter_value_list, filter_type)`
-- Parameters
- - `column_to_count`, the column to be calculated and applied on distinct count, required to be added as **Precise count distinct** measure
- - `column_to_filter`, the varied dimension
- - `filter_value_list`, the value of the varied dimensions listed in `array[]`,
- - `filter_type`, the data type is String, which identifies the filter mode. There are currently two optional values "RAWSTRING" and "REGEXP". When the parameter value is "RAWSTRING", the filtering mode is precise filtering. When `column_to_filter` is a Varchar type, A single element in the array can be mapped with multiple values. By default, it is separated by '|'. You can use `kylin.query.intersect.separator` to configure the separator. And only support configuration in the `kylin.pr [...]
-
-> **Note: ** When the filter_type is "RAWSTRING" and the data type of a varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
-> `select intersect_count_v2(column_to_count, column_to_filter, array[cast(3.53 as double), cast(5.79 as double)], 'RAWSTRING') from TEST_TABLE`
-> OR `select intersect_count_v2(column_to_count, column_to_filter, array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45'], 'RAWSTRING') from TEST_TABLE;`
-
-- Query Example 1
-
- ```sql
- select intersect_count_v2(
- LO_CUSTKEY, LO_SHIPMODE,
- array['R*L', 'TRU.*'], 'SHIP')
- from SSB.P_LINEORDER
- ```
-
-- Response Example 1
-
- 
-
-### INTERSECT_VALUE_V2
-
-- Description
- - Returns the values of the intersection of multiple result sets in different conditions. If the returned result is large, it may cause the analysis page browser to crash. Support Regexp in condition.
-- Syntax
- - `intersect_value_v2(column_to_count, column_to_filter, filter_value_list, filter_type)`
-- Parameters
- - `column_to_count`, the column to be calculated and applied on distinct value required to be added as **Precise count distinct** measure.
- **Only when type of column is one of integer family(tinyint、smallint、integer、bigint) and override model properties `kylin.query.skip-encode-integer-enabled=true`, the values returned is actual. Otherwise, encoded value will be returned.**
- - `column_to_filter`, the varied dimension
- - `filter_value_list`, the value of the varied dimensions listed in `array[]`,
- - `filter_type`, the data type is String, which identifies the filter mode. There are currently two optional values "RAWSTRING" and "REGEXP". When the parameter value is "RAWSTRING", the filtering mode is precise filtering. When `column_to_filter` is a Varchar type, A single element in the array can be mapped with multiple values. By default, it is separated by '|'. You can use `kylin.query.intersect.separator` to configure the separator. And only support configuration in the `kylin.pr [...]
-
-> **Note: ** When the filter_type is "RAWSTRING" and the data type of a varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
-> `select intersect_value_v2(column_to_count, column_to_filter, array[cast(3.53 as double), cast(5.79 as double)], 'RAWSTRING') from TEST_TABLE`
-> OR `select intersect_value_v2(column_to_count, column_to_filter, array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45'], 'RAWSTRING') from TEST_TABLE;`
-
-- Query Example 1
-
- ```sql
- select intersect_value_v2(
- LO_CUSTKEY, LO_SHIPMODE,
- array['R*L', 'TRU.*'], 'SHIP')
- from SSB.P_LINEORDER
- ```
-
-- Response Example 1
-
- 
-
-### Limitations
-- All the above functions don't support pushdown query
-- All the above functions don't support detailed index answers (even with the switch kylin.query.use-tableindex-answer-non-raw-query = true)
diff --git a/website/docs/query/insight/operator_function/function/intro.md b/website/docs/query/insight/operator_function/function/intro.md
deleted file mode 100644
index da50e9af6a..0000000000
--- a/website/docs/query/insight/operator_function/function/intro.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: Functions
-language: en
-sidebar_label: Functions
-pagination_label: Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-
-This chapter will introduce functions that applicable to SQL statements:
-
-- [Arithmetic Functions](arithmetic_function.md)
-- [String Functions](string_function.md)
-- [Date and Time Functions](datetime_function.md)
-- [Conditional Functions](conditional_function.md)
-- [Type Conversion Functions](type_function.md)
-- [Window Function](window_function.md)
-- [Grouping Function](grouping_function.md)
-- [Aggregate Functions](aggregate_function.md)
-- [Intersect Function](intersect_function.md)
-- [Other Functions](miscellaneous_function.md)
-- [Bitmap Functions](bitmap_function.md)
diff --git a/website/docs/query/insight/operator_function/function/miscellaneous_function.md b/website/docs/query/insight/operator_function/function/miscellaneous_function.md
deleted file mode 100644
index ee14c5ad46..0000000000
--- a/website/docs/query/insight/operator_function/function/miscellaneous_function.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-title: Other Functions
-language: en
-sidebar_label: Other Functions
-pagination_label: Other Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - other functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-| Syntax | Description | Example | Normal Query | Pushdown Query | Defined as Computed Column | Suggested as Computed Column |
-| ----------------------------- | ------------------------------------------------------------ | ------------------------------------------------------ | ------------ | -------------- | -------------------------- | ---------------------------- |
-| UUID() | Returns an universally unique identifier (UUID) string. The value is returned as a canonical UUID 36-character string | ` UUID()`<br /> = 46707d92-02f4-4817-8116-a4c3b23e6266 | ❌ | ✔️ | ❌ | ❌ |
-| MONOTONICALLY_INCREASING_ID() | Returns monotonically increasing 64-bit integers. The generated ID is guaranteed to be monotonically increasing and unique, but not consecutive. | ` MONOTONICALLY_INCREASING_ID()`<br /> = 1111111 | ✔️ | ✔️ | ❌ | ❌ |
-| EXPLODE(array) | Returns new rows for each element in the given array column. | `EXPLODE(array[1, 2, 3])`<br /> = <br/> 1 <br/> 2 <br/> 3 |✔️ |❌ | ❌ | ❌ |
-| SIZE(expr) | Expr must be of type array or map and return the number of elements contained in array or map. | `SIZE(array[1, 2, 3])`<br /> = <br/> 3 |✔️ |✔️ | ❌ | ❌ |
-
diff --git a/website/docs/query/insight/operator_function/function/string_function.md b/website/docs/query/insight/operator_function/function/string_function.md
deleted file mode 100644
index 72f143fcd4..0000000000
--- a/website/docs/query/insight/operator_function/function/string_function.md
+++ /dev/null
@@ -1,50 +0,0 @@
----
-title: String Functions
-language: en
-sidebar_label: String Functions
-pagination_label: String Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - string functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-| Syntax | Description | Example | Normal Query | Pushdown Query | Defined as Computed Column | Suggested as Computed Column |
-| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------ | -------------- | -------------------------- | ---------------------------- |
-| CHAR_LENGTH(string) | Returns the number of characters in a character string | `CHAR_LENGTH('Kylin')`<br /> = 5 | ✔️ | ✔️ | ✔️ | ✔️ |
-| CHARACTER_LENGTH(string) | As CHAR_LENGTH(*string*) | ` CHARACTER_LENGTH('Kylin')`<br /> = 5 | ✔️ | ✔️ | ✔️ | ✔️ |
-| UPPER(string) | Returns a character string converted to upper case | ` UPPER('Kylin')`<br /> = KYLIN | ✔️ | ✔️ | ✔️ | ✔️ |
-| LOWER(string) | Returns a character string converted to lower case | ` LOWER('Kylin')`<br /> = kylin | ✔️ | ✔️ | ✔️ | ✔️ |
-| POSITION(string1 IN string2) | Returns the position of the first occurrence of *string1* in *string2* | ` POSITION('Kyli' IN 'Kylin')`<br /> = 1 | ✔️ | ✔️ | ✔️ | ✔️ |
-| TRIM( `{` BOTH \ LEADING\ TRAILING `}` string1 FROM string2) | Removes the longest string containing only the characters in *string1* from the both ends/start/end of *string1* | Example1: <br />` TRIM(BOTH '6' FROM '666Kylin66')`<br /> = Kylin<br /><br />Example 2: <br />` TRIM(LEADING '6' FROM '666Kylin66')`<br /> = Kylin66<br /><br />Example 3: <br />` TRIM(TRAILING '6' FROM '666Kylin66')`<br /> = 666Kylin | ✔️ | ✔️ | ✔️ | ❌ [...]
-| OVERLAY(string1 PLACING string2 FROM integer [ FOR integer2 ]) | Replaces a substring of *string1* with *string2* starting at the integer bit | `OVERLAY('666' placing 'KYLIN' FROM 2 for 2)`<br/>= 6KYLIN | ✔️ | ✔️ | ✔️ | ✔️ |
-| SUBSTRING(string FROM integer) | Returns a substring of a character string starting at a given point | ` SUBSTRING('Kylin' FROM 5)`<br /> = n | ✔️ | ✔️ | ✔️ | ✔️ |
-| SUBSTRING(string FROM integer1 FOR integer2) | Returns a substring of a character string starting at a given point with a given length | ` SUBSTRING('KYlin' from 5 for 2)`<br /> = n | ✔️ | ✔️ | ✔️ | ✔️ |
-| INITCAP(string) | Returns *string* with the first letter of each word converter to upper case and the rest to lower case. Words are sequences of alphanumeric characters separated by non-alphanumeric characters. | ` INITCAP('kylin')`<br /> = Kylin | ✔️ | ✔️ | ✔️ | ✔️ |
-| REPLACE(string, search, replacement) | Returns a string in which all the occurrences of *search* in *string* are replaced with *replacement*; if *replacement* is the empty string, the occurrences of *search* are removed | ` REPLACE('Kylin','Kyli','Kyliiiiiii')`<br /> = Kyliiiiiiin | ✔️ | ✔️ | ✔️ | ✔️ |
-| BASE64(bin) | Converts the argument from a binary `bin` to a base 64 string | ` BASE64('Spark SQL')`<br /> = U3BhcmsgU1FM | ✔️ | ✔️ | ✔️ | ✔️ |
-| DECODE(bin, charset) | Decodes the first argument using the second argument character set (one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16'). If either argument is null, the result will also be null | ` DECODE(ENCODE('abc', 'utf-8'), 'utf-8')`<br /> = abc | ✔️ | ✔️ | ✔️ | ✔️ |
-| ENCODE(str, charset) | Encodes the first argument using the second argument character set(one of 'US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16'). If either argument is null, the result will also be null | ` ENCODE('abc', 'utf-8')`<br /> = `[B@2b442236` | ✔️ | ✔️ | ❌ | ❌ |
-| FIND_IN_SET(str, str_array) | Returns the index (1-based) of the given string (`str`) in the comma-delimited list (`str_array`).Returns 0, if the string was not found or if the given string (`str`) contains a comma | ` FIND_IN_SET('ab','abc,b,ab,c,def')`<br /> = 3 | ✔️ | ✔️ | ✔️ | ✔️ |
-| LCASE(string) | Returns `string` with all characters changed to lowercase | `LCASE('SparkSql')`<br /> = sparksql | ✔️ | ✔️ | ✔️ | ✔️ |
-| LEVENSHTEIN(str, str) | Returns the Levenshtein distance between the two given strings | ` LEVENSHTEIN('kitten', 'sitting')`<br /> = 3 | ✔️ | ✔️ | ✔️ | ✔️ |
-| LOCATE(substr, str[, pos]) | Returns the position of the first occurrence of `substr` in `str` after position `pos`. The given `pos` and return value are 1-based | ` LOCATE('bar', 'foobarbar')`<br /> = 4 <br /> `LOCATE('bar', 'foobarbar', 5)` <br /> =7 | ✔️ | ✔️ | ✔️ | ✔️ |
-| LPAD(str, len, pad) | Returns `str`, left-padded with `pad` to a length of `len`.If `str` is longer than `len`, the return value is shortened to `len` characters. | ` LPAD('hi', 5, '??')`<br /> = ???hi | ✔️ | ✔️ | ✔️ | ✔️ |
-| RPAD(str, len, pad) | Returns `str`, right-padded with `pad` to a length of `len`. If `str` is longer than `len`, the return value is shortened to `len` characters | ` RPAD('hi', 5, '??')`<br /> = hi??? | ✔️ | ✔️ | ✔️ | ✔️ |
-| RTRIM(trimStr, str) | Removes the trailing string which contains the characters from the trim string from the `str` | `RTRIM('KR', 'SPARK')`<br /> = SPA | ✔️ | ✔️ | ✔️ | ✔️ |
-| SENTENCES(str) | Splits `str` into an array of array of words. | ` SENTENCES('Hi there! Good morning.')`<br /> = [["Hi","there"],["Good","morning"]] | ✔️ | ✔️ | ❌ | ❌ |
-| SUBSTRING_INDEX(str, delim, count) | Returns the substring from `str` before `count` occurrences of the delimiter `delim`. If `count` is positive, everything to the left of the final delimiter (counting from the left) is returned. If `count` is negative, everything to the right of the final delimiter (counting from the right) is returned. The function substring_index performs a case-sensitive match when searching for `delim` | ` SUBSTRING_INDEX('www.apache.or [...]
-| UCASE(str) | Returns `str` with all characters changed to uppercase. | ` UCASE('SparkSql')`<br /> = SPARKSQL | ✔️ | ✔️ | ✔️ | ✔️ |
-| UNBASE64(str) | Converts the argument from a base 64 string `str` to a binary. | ` UNBASE64('U3BhcmsgU1FM')`<br /> = `[B@7c66820d` | ✔️ | ✔️ | ❌ | ❌ |
-| ASCII(str) | Convert character to corresponding ascii code | ` ASCII('a')` = 97| ✔️ | ❌| ✔️ | ✔️ |
-| CHR(str) | Convert ascii code to corresponding character| ` CHR(97)` = a| ✔️ | ❌| ✔️ | ✔️ |
-| SPACE(len) | Generate `len` number of continuous space | space(2) =` ` | ✔️ | ❌| ❌ | ❌ |
-| SPLIT_PART(str, separator, index) | Split `str` with `separator` and return the `index`-th token. `index` counts from 1. when `index` is negative, tokens are counted starting from the right. | `split_part('a-b-c', '-', 1)` = a, <br /> `split_part('a-b-c', '-', -1)` = c,| ✔️ | ❌| ✔️ | ✔️ |
-| CONCAT(any, [any]*) | Concatenates multiple data of any type into a string | `concat('Kyl', 'in') `= Kylin | ✔️ | ✔️ | ✔️ | ✔️ |
-| REPEAT(str,n)| Repeat `str` `n` times and return string. When querying the model, `str` supports passing in constants, columns and expressions, and `n` only supports passing in constants | `repeat('kylin',2)` ='kylinkylin' | ✔️ | ✔️ | ✔️ | ✔️ |
-| LEFT(str,n)| Return the `n` characters from the left of `str`. When querying the model, `str` supports passing in constants, columns, and `n` only supports passing in constants | `left('kylin',2)` ='ky' | ✔️ | ✔️ | ✔️ | ✔️ |
diff --git a/website/docs/query/insight/operator_function/function/type_function.md b/website/docs/query/insight/operator_function/function/type_function.md
deleted file mode 100644
index 076c853d19..0000000000
--- a/website/docs/query/insight/operator_function/function/type_function.md
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: Type Functions
-language: en
-sidebar_label: Type Functions
-pagination_label: Type Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - type functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-| Syntax | Description | Example | Normal Query | Pushdown Query | Defined as Computed Column | Suggested as Computed Column |
-| ------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
-| CAST(value AS type) | Converts a value to a given type. | Example 1: Converts `time` to `string`<br />`CAST(CURRENT_DATE as varchar)`<br /> = 2018-10-10 | ✔️ | ✔️ | ✔️ | ✔️ |
-| DATE<String> | Converts a string to DATE type,<br />equaling to CAST(string AS date) | Example 1:<br />`DATE'2018-10-10'`<br /> = 2018-10-10<br /><br />Example 2: Gets the corresponding month of the string (use with time function, MONTH() )<br />`MONTH(DATE'2018-10-10')`<br /> = 10 | ✔️ | ✔️ | ❌ | ❌ |
-| TIMESTAMP<String> | Converts a string to TIMESTAMP type,<br />equaling to CAST(string AS timestamp) | Example 1:<br />`TIMESTAMP'2018-10-10 15:57:07`<br /> = 2018-10-10 15:57:07<br /><br />Example 2: Gets the corresponding second of the string (use with time function, SECOND() )<br />`SECOND(TIMESTAMP'2018-10-10 15:57:07')`<br /> = 7 | ✔️ | ✔️ | ❌ | ❌ |
-
-> Note:
->
-> 1. Only the following types of conversions are supported: `char`,` varchar`, `boolean`, `int`,` integer`, `tinyint`,` smallint`, `bigint`,` float`, `double`,` decimal`, `numeric`,` date`, `time`,` timestamp`
-> 2. However, conversion from `bigint` to` timestamp` is not supported at this time
-> 3. If converting from `char` to` int`, non-numeric values in `char` will return null
-> 4. Length n does not take effect when other data types are converted to `char(n)`/`varchar(n)`
diff --git a/website/docs/query/insight/operator_function/function/window_function.md b/website/docs/query/insight/operator_function/function/window_function.md
deleted file mode 100644
index 8a74c57d32..0000000000
--- a/website/docs/query/insight/operator_function/function/window_function.md
+++ /dev/null
@@ -1,163 +0,0 @@
----
-title: Window Functions
-language: en
-sidebar_label: Window Functions
-pagination_label: Window Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - window functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-You can use window function to simplify the query process and analyze more complicated scenarios with a better performance.
-
-> **Note:** Window functions are currently not supported to be defined or recommended as computed columns.
-
-### Syntax structure
-
-- function(value) OVER window
-- The composition of the window:
- - *partition by*: group clause, which represents the calculation range of the window function.
- - *order by*: sort clause, indicating the sorting method within the group after partition.
- - *rows/range*: window clause, indicating that after partition, a sliding data window is determined in the group. The window functions will do calculation based on the data range contained in the window.
- - *rows* is a physical window, that is, the fixed before and after records of the current row number are selected according to the results sorted by the *order by* clause. The result of this clause has nothing to do with the value of the current row, but the sorted row number.
- - Take SQL sum (column A) rows between 1 preceding and 2 following as an example. If the *column A* of the current row is sorted with a sorted row number of 3, then this clause will select the records where the sequence number of *column A* lies between 2 and 5.
- - *range* is a logical window, that is, based on the value of the current row, the fixed before and after records of the value of the current row are selected. The result of this clause has nothing to do with the sorted row number, but the value of the row.
- - Take SQL sum (column A) range between 1 preceding and 2 following as an example. If the value of *column A* is 3, then this clause will select the records where the value of *column A* lies between between 2 and 5.
- - If an *order by* clause is specified without window clause, the default window clause is equal to SQL range between unbounded preceding and current row.
-
-### Examples of window functions
-
-And then we'll illustrate the usage of every single window function with table *P_LINEORDER* in the [sample dataset](../../../../quickstart/tutorial.md), where you may also find the fields and corresponding descriptions.
-
-- **ROW_NUMBER**
-
- - Function description: ROW_NUMBER() OVER window, returning the position of the current row in its partition, the sequence numbers are not repeated.
-
-- **RANK**
-
- - Function description: RANK() OVER window, returning the position of the current row in its partition, possibly with sequence gaps.
-
-- **DENSE_RANK**
-
- - Function description: DENSE_RANK() OVER window, returning the position of the current row in its partition with no sequence gaps.
-
-- **Query Example**
- For comparison, we use RANK () and DENSE_RANK () and ROW_NUMBER () in the same query to query the first five orders with the least number of items purchased by each buyer. The query is as follows:
-
- ```SQL
- SELECT *
- FROM (
- SELECT
- ROW_NUMBER() OVER w AS ROW_NUM,
- RANK() OVER w AS _RANK,
- DENSE_RANK() OVER w AS D_RANK,
- LO_ORDERKEY,
- LO_CUSTKEY,
- LO_QUANTITY,
- LO_PARTKEY
- FROM SSB.P_LINEORDER
- WINDOW w AS (PARTITION BY LO_CUSTKEY ORDER BY LO_QUANTITY)
- ) T
- WHERE ROW_NUM <= 5;
- ```
-
-- **Result**
- 
-
-- **Result Explanation**
- For buyer with id '1', there are four orders with quantity of 1, and the above three functions are compared as follows:
-
- - When using row_number() function, orders with *LO_QUANTITY* as 1 are ranked as 1, 2, 3, 4, and the order with *LO_QUANTITY* as 2 is ranked as 5.
-
- - When using rank() function, orders with *LO_QUANTITY* as 1 are ranked as 1, 1, 1, 1, and the order with *LO_QUANTITY* as 2 is ranked as 5, which exists sequence gaps.
-
- - When using dense_rank() function, orders with *LO_QUANTITY* as 1 are ranked as 1, 1, 1, 1, and the order with *LO_QUANTITY* as 2 is ranked as 2, which does not exist sequence gaps.
-
-
-
-- **NTILE**
-
- - Function description: NTILE(value) OVER window, returning an integer ranging from 1 to value, dividing the partition as equally as possible
-
-- **Query Example**
- The orders of each buyer are divided into 3 groups according to the number of purchased products. In order to display the search results completely, the orders with the number of products greater than or equal to 48 are selected for grouping.
-
- ```SQL
- SELECT
- NTILE(3) OVER w AS N_3,
- LO_ORDERKEY,
- LO_CUSTKEY,
- LO_QUANTITY,
- LO_PARTKEY
- FROM SSB.P_LINEORDER
- WHERE LO_QUANTITY >= 48
- WINDOW w AS (PARTITION BY LO_CUSTKEY ORDER BY LO_QUANTITY);
- ```
-
-- **Result**
- 
-
-- **FIRST_VALUE**
-
- - Function description: FIRST_VALUE(value) OVER window, returning value evaluated at the row that is the first row of the window frame
-
-- **LAST_VALUE**
-
- - Function description: LAST_VALUE(value) OVER window, returning value evaluated at the row that is the last row of the window frame
-
-- **Query Sample**
- Query the first order and the last order with the highest total price sorted by date.
-
- ```SQL
- SELECT
- FIRST_VALUE(TOTAL1) OVER W AS FIRST_VALUE_A,
- LAST_VALUE(TOTAL1) OVER W AS LAST_VALUE_A,
- TOTAL1,
- LO_ORDERDATE
- FROM (
- SELECT
- SUM(LO_ORDTOTALPRICE) AS TOTAL1,
- LO_ORDERDATE
- FROM SSB.P_LINEORDER
- GROUP BY LO_ORDERDATE
- ) T WINDOW W AS (
- ORDER BY LO_ORDERDATE ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
- )
- ORDER BY LO_ORDERDATE DESC
- ```
-
-- **Result**
- 
-
-
-
-- **LEAD()**
-
- - Function description: LEAD(value, offset, default) OVER window, returning the offset row backwards from the current row in the partition. *value* represents the column as the current value, *offset* represents the number that needs to be searched for the offset row backwards based on the current value, and *default* represents the value returned by default when there is no eligible value, and null is returned by default if not filled.
-- **LAG()**
-
- - Function description: LAG(value, offset, default) OVER window, returning the forward offset of the current row in the partition. *value* represents the field as the column value, *offset* represents the number that needs to be looked up in the offset row forwards based on the current value, *default* represents the value returned by default when there is no eligible value, and null is returned by default if not filled.
-
-- **Query Sample**
- Query the time of last order and next order based on current order.
-
- ```SQL
- SELECT
- LO_ORDERKEY,
- LO_CUSTKEY,
- LO_QUANTITY,
- LO_ORDERDATE,
- LEAD(LO_ORDERDATE, 1) OVER W AS NEXT_DT,
- LAG(LO_ORDERDATE, 1) OVER W AS LAST_DT
- FROM SSB.P_LINEORDER
- WINDOW W AS (PARTITION BY LO_CUSTKEY ORDER BY LO_ORDERDATE)
- ```
-
-- **Result**
- 
diff --git a/website/docs/query/insight/operator_function/intro.md b/website/docs/query/insight/operator_function/intro.md
deleted file mode 100644
index 738ff9f562..0000000000
--- a/website/docs/query/insight/operator_function/intro.md
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: Operators and Functions
-language: en
-sidebar_label: Operators and Functions
-pagination_label: Operators and Functions
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - operators
- - functions
-draft: false
-last_update:
- date: 08/17/2022
----
-
-This chapter will introduce more operators and functions that applicable to SQL statements.
diff --git a/website/docs/query/insight/operator_function/operator/arithmetic_operator.md b/website/docs/query/insight/operator_function/operator/arithmetic_operator.md
deleted file mode 100644
index 03dbdc5bff..0000000000
--- a/website/docs/query/insight/operator_function/operator/arithmetic_operator.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-title: Arithmetic Operators
-language: en
-sidebar_label: Arithmetic Operators
-pagination_label: Arithmetic Operators
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - arithmetic operators
-draft: false
-last_update:
- date: 08/17/2022
----
-
-
-| Operator | Description | Syntax | Example |
-| -------- | ---------------------------------------- | ------ | -------------------- |
-| + | Plus | A+B | Cost+Profit |
-| - | Minus. | A-B | Revenue- Cost |
-| * | Multiply. Returns *numeric1* multiplied by *numeric2* | A*B | Unit_Price* Quantity |
-| / | Divide | A/B | Total_Sale/Quantity |
diff --git a/website/docs/query/insight/operator_function/operator/comparison_operator.md b/website/docs/query/insight/operator_function/operator/comparison_operator.md
deleted file mode 100644
index 935ed6ea2d..0000000000
--- a/website/docs/query/insight/operator_function/operator/comparison_operator.md
+++ /dev/null
@@ -1,38 +0,0 @@
----
-title: Comparison Operators
-language: en
-sidebar_label: Comparison Operators
-pagination_label: Comparison Operators
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - comparison operators
-draft: false
-last_update:
- date: 08/17/2022
----
-
-| Operator | Description | Syntax | Example |
-| -------------------- | ------------------------------------------------------------ | ------------------------------------------- |----------------------------------------------------------------------------------|
-| `<` | Less than | A`<`B | Profit `<` Cost |
-| `<=` | Less than or equal | A`<=`B | Profit `<=` Cost |
-| `>` | Greater than | A`>=`B | Profit `>` Cost |
-| `>=` | Greater than or equal | A`>=`B | Profit `>=` Cost |
-| `<>` | Not Equal | A`<>`B | Profit1 `<>` Profit2 |
-| IS NULL | Whether *value* is null | value IS NULL | profit IS NULL |
-| IS NOT NULL | Whether *value* is not null | value IS NOT NULL | profit IS NOT NULL |
-| IS DISTINCT FROM | Whether two values are not equal, treating null values as the same | value1 IS DISTINCT FROM value2 | profit1 IS DISTINCT FROM profit2 |
-| IS NOT DISTINCT FROM | Whether two values are equal, treating null values as the same | value1 IS NOT DISTINCT FROM value2 | profit1 IS NOT DISTINCT FROM profit2 |
-| BETWEEN | Return true if the specified value is greater than or equal to value1 and less than or equal to value2 | A BETWEEN value1 AND value2 | profit BETWEEN 1 AND 1000 Date BETWEEN '2016-01-01' AND '2016-12-30' |
-| NOT BETWEEN | Whether *value1* is less than *value2* or greater than *value3* | value1 NOT BETWEEN value2 AND value3 | profit NOT BETWEEN 1 AND 1000 Date NOT BETWEEN '2016-01-01' AND '2016-12-30' |
-| LIKE | Whether *string1* matches pattern *string2*, *string1* and *string2* are string types | string1 LIKE string2 | name LIKE '%frank%' |
-| NOT LIKE | Whether *string1* does not match pattern *string2*, *string1* and *string2* are string types | string1 NOT LIKE string2 [ ESCAPE string3 ] | name NOT LIKE '%frank%' |
-| SIMILAR TO | Whether *string1* matches *string2* in regular expression | string1 SIMILAR TO string2 | name SIMILAR TO 'frank' |
-| NOT SIMILAR TO | Whether *string1* does not match *string2* in regular expression | string1 NOT SIMILAR TO string2 | name NOT SIMILAR TO 'frank' |
-
-
-Limitations
-- The current SIMILAR TO ESCAPE syntax is limited to scenarios that support adding and hitting the model in SQL statements, and other scenarios such as adding computable columns.
-- The string literals including specific symbols need to be escaped by default and the escape character is `\`. For example, to match `\kylin` , it should be using `\\kylin`. For `SIMILAR TO` and `NOT SIMILAR TO` function, the functions use regex match and there is an escaped process. For example, for `\\\\kylin`, the result will be `true` when using `SIMILAR TO` to compare with `\kylin` and `\\kylin`.
diff --git a/website/docs/query/insight/operator_function/operator/images/string.png b/website/docs/query/insight/operator_function/operator/images/string.png
deleted file mode 100644
index 7ef9ef560c..0000000000
Binary files a/website/docs/query/insight/operator_function/operator/images/string.png and /dev/null differ
diff --git a/website/docs/query/insight/operator_function/operator/intro.md b/website/docs/query/insight/operator_function/operator/intro.md
deleted file mode 100644
index c0a7e59b00..0000000000
--- a/website/docs/query/insight/operator_function/operator/intro.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: Operators
-language: en
-sidebar_label: Operators
-pagination_label: Operators
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - operators
-draft: false
-last_update:
- date: 08/17/2022
----
-
-This chapter will introduce operators that applicable to SQL statements.
diff --git a/website/docs/query/insight/operator_function/operator/logical_operator.md b/website/docs/query/insight/operator_function/operator/logical_operator.md
deleted file mode 100644
index 61e2e87cf7..0000000000
--- a/website/docs/query/insight/operator_function/operator/logical_operator.md
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: Logical Operators
-language: en
-sidebar_label: Logical Operators
-pagination_label: Logical Operators
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - logical operators
-draft: false
-last_update:
- date: 08/17/2022
----
-
-This section introduces the logical operators supported by Apache Kylin. The values of logical propositions are TRUE, FALSE, and UNKNOWN. The following `boolean` refers to a logical proposition.
-
-| Operator | Description | Syntax | Example |
-| ------------ | ---------------------------------------- | --------------------- | ----------------------------- |
-| AND | Whether *boolean1* and *boolean2* are both TRUE | boolean1 AND boolean2 | Name ='frank' AND gender='M' |
-| OR | Whether *boolean1* is TRUE or *boolean2* is TRUE | boolean1 OR boolean2 | Name='frank' OR Name='Hentry' |
-| NOT | Whether *boolean* is not TRUE; returns UNKNOWN if *boolean* is UNKNOWN | NOT boolean | NOT (NAME ='frank') |
-| IS FALSE | Whether *boolean* is FALSE; returns FALSE if *boolean* is UNKNOWN | boolean IS FALSE | Name ='frank' IS FALSE |
-| IS NOT FALSE | Whether *boolean* is not FALSE; returns TRUE if *boolean* is UNKNOWN | boolean IS NOT FALSE | Name ='frank' IS NOT FALSE |
-| IS TRUE | Whether *boolean* is TRUE; returns FALSE if *boolean* is UNKNOWN | boolean IS TRUE | Name ='frank' IS TRUE |
-| IS NOT TRUE | Whether *boolean* is not TRUE; returns TRUE if *boolean* is UNKNOWN | boolean IS NOT TRUE | Name ='frank' IS NOT TRUE |
-
diff --git a/website/docs/query/insight/operator_function/operator/string_operator.md b/website/docs/query/insight/operator_function/operator/string_operator.md
deleted file mode 100644
index 29f6768d5d..0000000000
--- a/website/docs/query/insight/operator_function/operator/string_operator.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-title: String Operator
-language: en
-sidebar_label: String Operator
-pagination_label: String Operator
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - string operator
-draft: false
-last_update:
- date: 08/17/2022
----
-
-
-
-
diff --git a/website/docs/query/intro.md b/website/docs/query/intro.md
deleted file mode 100644
index 8e339abc47..0000000000
--- a/website/docs/query/intro.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: SQL Query
-language: en
-sidebar_label: SQL Query
-pagination_label: SQL Query
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - sql query
-draft: false
-last_update:
- date: 08/17/2022
----
-
-This chapter introduces how to execute SQL queries in kylin, as well as the supported SQL grammar and guidelines.
diff --git a/website/docs/query/optimization/intro.md b/website/docs/query/optimization/intro.md
deleted file mode 100644
index fccb87091b..0000000000
--- a/website/docs/query/optimization/intro.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-title: Query Optimization
-language: en
-sidebar_label: Query Optimization
-pagination_label: Query Optimization
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - query optimization
-draft: false
-last_update:
- date: 08/17/2022
----
-
-# Query Optimization
-
-This chapter will introduce some query optimization in Kylin.
diff --git a/website/docs/query/principles/by_internal_table.md b/website/docs/query/principles/by_internal_table.md
new file mode 100644
index 0000000000..c53a1cfa88
--- /dev/null
+++ b/website/docs/query/principles/by_internal_table.md
@@ -0,0 +1,16 @@
+---
+title: Responded By InternalTable
+language: en
+sidebar_label: Responded By InternalTable
+pagination_label: Responded By InternalTable
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - execution principle
+draft: false
+last_update:
+ date: 09/13/2024
+---
+
diff --git a/website/docs/query/principles/by_model.md b/website/docs/query/principles/by_model.md
new file mode 100644
index 0000000000..9111c3fb94
--- /dev/null
+++ b/website/docs/query/principles/by_model.md
@@ -0,0 +1,17 @@
+---
+title: Responded By Model
+language: en
+sidebar_label: Responded By Model
+pagination_label: Responded By Model
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - execution principle
+draft: false
+last_update:
+ date: 09/13/2024
+---
+
+
diff --git a/website/docs/query/principles/precalculation.md b/website/docs/query/principles/precalculation.md
new file mode 100644
index 0000000000..d47e963ea1
--- /dev/null
+++ b/website/docs/query/principles/precalculation.md
@@ -0,0 +1,41 @@
+---
+title: Precalculation
+language: en
+sidebar_label: Precalculation
+pagination_label: Precalculation
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - execution principle
+draft: false
+last_update:
+ date: 09/13/2024
+---
+
+
+Different from regular query engines, Kylin uses precalculated results to replace real time calculation, in order to improve the query performance and concurrency. A simplified version of query execution process can be described as below:
+
+1. Parse SQL statement and extract all the `FROM` clauses.
+
+2. Find the **matching** and **minimum cost** model for each `FROM` clause.
+
+ The **matching** here means:
+
+ * The relationship of tables used in `FROM` clause must match the fact and dimension tables defined in models. Please note that the relationship of `LEFT JOIN` does not match `INNER JOIN`.
+ * For aggregate queries, the columns in `GROUP BY` clause must be defined as dimensions in models. Meanwhile, the aggregate functions in `SELECT` clause must be defined as measures in models.
+ * For non-aggregate queries, table index must be defined in models and all columns appeared in query must be contained in the table index.
+
+ The **minimum cost** here means that Kylin will automatically select the minimum cost index if there are multiple matching indices. For example, table index can also serve aggregate queries, but its cost is high because of the real time calculation. Therefore, using table index to answer aggregate query is always the last option and only happens when all aggregate indices cannot match.
+
+3. If all the `FROM` clauses match successfully, Kylin will execute the query using index data.
+
+ All the `FROM` clauses will be replaced by precalculated results, and the query will execute from there to get the final result. If you execute queries via Web UI, you can find the name(s) of the answering model(s) in the **Answered By** field after a query returns successfully. For more details, please refer to [Execute SQL Query in Web UI](../web_ui/insight.md).
+
+4. If there is one or more `FROM` clause cannot find a matching index, then Kylin cannot execute the query using index data.x
+
+ The query will fail with an error message of `no model found` or `no realization found`. This means the data required for this query does not exist in the system.
+
+ As a special case, if the pushdown engine is enabled, then Kylin will not report error, and instead route this query to the pushdown engine. For more details, please refer to [Query Pushdown](../../query/push_down.md).
+
diff --git a/website/docs/query/pushdown/pushdown_to_embedded_spark.md b/website/docs/query/push_down.md
similarity index 91%
rename from website/docs/query/pushdown/pushdown_to_embedded_spark.md
rename to website/docs/query/push_down.md
index 29ef6ba7b9..97850625c5 100644
--- a/website/docs/query/pushdown/pushdown_to_embedded_spark.md
+++ b/website/docs/query/push_down.md
@@ -1,19 +1,22 @@
---
-title: Pushdown to Embedded SparkSQL
+title: Pushdown
language: en
-sidebar_label: Pushdown to Embedded SparkSQL
-pagination_label: Pushdown to Embedded SparkSQL
+sidebar_label: Pushdown
+pagination_label: Pushdown
toc_min_heading_level: 2
toc_max_heading_level: 6
pagination_prev: null
pagination_next: null
keywords:
- - pushdown to embedded sparksql
+ - pushdown
draft: false
last_update:
date: 08/17/2022
---
+Kylin integrates a Smart Pushdown engine which works SQL on Hadoop engine like SparkSQL.
+
+For queries which cannot be answered by Kylin, they can be routed into Pushdown Query Engine when necessary.
Kylin uses pre-calculation instead of online calculation to achieve sub-second query latency on big data. In general, the model with pre-calculated data is able to serve the most frequently-used queries. But if a query is beyond the model's definition, the system will route it to the Kylin smart pushdown engine. The embedded pushdown engine is Spark SQL.
@@ -29,7 +32,7 @@ By default, the query pushdown is turned on in a new project. If you need to tur
**At project level:** As shown below, click the left navigation bar **Setting** tab and in the **Basic Settings -> Pushdown Setting** part, you can turn off the Pushdown Engine in the red frame. If this setting has never been modified at project level, it takes instance level setting as default value.
-
+
**At instance level:** Query pushdown is turned on by default, which corresponds to the configuration item `kylin.query.pushdown-enabled=true` in the configuration file `${KYLIN_HOME}/conf/kylin.properties`. To turn it off, add `kylin.query.pushdown-enabled=false` into the configuration file.
diff --git a/website/docs/query/pushdown/intro.md b/website/docs/query/pushdown/intro.md
deleted file mode 100644
index 646772e3d7..0000000000
--- a/website/docs/query/pushdown/intro.md
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: Query Pushdown
-language: en
-sidebar_label: Query Pushdown
-pagination_label: Query Pushdown
-toc_min_heading_level: 2
-toc_max_heading_level: 6
-pagination_prev: null
-pagination_next: null
-keywords:
- - query pushdown
-draft: false
-last_update:
- date: 08/17/2022
----
-
-Kylin integrates a Smart Pushdown engine which works SQL on Hadoop engine like SparkSQL.
-
-For queries which cannot be answered by Kylin, they can be routed into Pushdown Query Engine when necessary.
-
diff --git a/website/docs/query/history.md b/website/docs/query/query_history.md
similarity index 80%
rename from website/docs/query/history.md
rename to website/docs/query/query_history.md
index 695825f145..cfb53dc109 100644
--- a/website/docs/query/history.md
+++ b/website/docs/query/query_history.md
@@ -14,7 +14,7 @@ last_update:
date: 08/17/2022
---
-All the queries that you executed in Kylin will be saved in query history, you can check it out in the left side navigation bar **Query -> History**.
+All the queries that you executed in Kylin will be saved in query history, you can check it out on the left side navigation bar **Query -> History**.
This page saves the basic information of queries, such as query time, SQL statement, query user, etc. This helps you to record query behaviors, which enables you to better manage and optimize the models. This chapter will presents you the content of query history page.
@@ -29,33 +29,33 @@ This page saves the basic information of queries, such as query time, SQL statem
- Query 1:query total revenue.
```sql
+ -- column *LO_REVENUE* 's SUM measure exists.
+
select SUM(LO_REVENUE) as TOTAL_REVENUE from SSB.P_LINEORDER
```
- > Hint:column *LO_REVENUE* 's SUM measure exists.
-
- Query 2:query total order price.
```sql
+ -- column *LO_ORDTOTALPRICE* 's SUM measure not exists.
+
select SUM(LO_ORDTOTALPRICE) from SSB.P_LINEORDER
```
- > Hint:column *LO_ORDTOTALPRICE* 's SUM measure not exists.
-
- Query 3:query name of commodities.
```sql
+ -- this is a wrong query,because column *P_NAME* does not exist in table *P_LINEORDER*.
+
select P_NAME from SSB.P_LINEORDER
```
- > Hint:this is a wrong query,because column *P_NAME* does not exist in table *P_LINEORDER*.
-
-### Query History Page
+### Go to the History Window
Please enter the query history page by clicking **Query -> History** in the navigator bar, after executing the above SQL statements, you will see the following content.
-
+
Each line in the picture is a query history record. The meaning of the columns are as follows:
@@ -89,7 +89,7 @@ Each line in the picture is a query history record. The meaning of the columns a
When you click on the icon to the left of a query, the execution details of the query will be displayed, as shown below:
-
+
On the left is the SQL statement, you can copy and paste and then query. The fields on the right have the following meanings:
@@ -105,32 +105,40 @@ On the left is the SQL statement, you can copy and paste and then query. The fie
When you click on the error details to the right of a query failure, the exception details of that query are displayed,as shown below:
-
+
> **Note**: When SQL does not wrap, only the first 100 lines of SQL can be seen in the query execution details. When SQL wraps, the details display the first 2000 characters. You can click the copy button in the upper right corner of the SQL statement box to copy the complete SQL statement.
-Kylin uses the built-in RDBMS to save information about queries. You can refer to all fields and meanings related to query history in the appendix [Query History Fields Table](../deployment/on-premises/rdbms_metastore/query_history_fields.md).
+Kylin uses the built-in RDBMS to save information about queries. You can refer to all fields and meanings related to query history in the appendix [Query History Fields Table](../../deployment/on-premises/rdbms_metastore/query_history_fields.md).
-### Query History Retention
+### Configure Retention
In order to ensure the read and write performance of the query history and database stability, Kylin sets a default retention limit for the query history:
+You can set the query history retention limit in the **kylin.properties** file.
+```shell
+### default total number of retained records
+kylin.query.queryhistory.max-size=10000000
-- The default total number of retained records is 10 million, which can be adjusted by configuring `kylin.query.queryhistory.max-size` in `kylin.properties`
- - The default number of retained records in one project is 1 million, which can be adjusted by configuring `kylin.query.queryhistory.project-max-size` in `kylin.properties`
-- The total retention time is 30 days, which can be adjusted by configuring `kylin.query.queryhistory.survival-time-threshold` in `kylin.properties`
+### default number of retained records in one project
+kylin.query.queryhistory.project-max-size=1000000
+### total retention time
+kylin.query.queryhistory.survival-time-threshold=30
+```
-### Export query history
+### Export History Records
The query history can be exported as a csv file, as shown in the figure below, the export result is the filtered data.
-
+
You can also export the sql in the query history as a text file separately, as shown in the figure below, the export result is also the filtered data.
-
+
Query history support configuration export upper limit, the default value is 100000.
-```kylin.query.query-history-download-max-size=100000```
+```shell
+kylin.query.query-history-download-max-size=100000
+```
diff --git a/website/docs/query/specification/bitmap_function.md b/website/docs/query/specification/bitmap_function.md
new file mode 100644
index 0000000000..3bf0e5c008
--- /dev/null
+++ b/website/docs/query/specification/bitmap_function.md
@@ -0,0 +1,162 @@
+---
+title: Bitmap Functions
+language: en
+sidebar_label: Bitmap Functions
+pagination_label: Bitmap Functions
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - bitmap function
+draft: false
+last_update:
+ date: 09/13/2024
+---
+
+Users can use bitmap functions to operate de-duplication based on bitmap. Then find the intersection of the result bitmaps.
+
+
+### BITMAP_UUID
+
+Syntax: BITMAP_UUID(column_to_count)
+
+Description: Returning a string which points to a hidden serialized bitmap. The bitmap contains de-duplicated values and can be an input to other bitmap functions.
+
+Parameters:
+- `column_to_count`, the column to be calculated and applied on distinct value, required to be added as **Precise count distinct** measure.
+
+For example:
+```sql
+-- Return a string which points to a hidden serialized bitmap. The bitmap result is
+-- the de-duplicated seller id set of online transactions on New Year's Day. The bitmap
+-- can be used as an input to other bitmap functions.
+
+select bitmap_uuid(LO_CUSTKEY)
+from SSB.P_LINEORDER
+where LO_ORDERDATE = date '2012-01-01'
+```
+
+
+
+### INTERSECT_BITMAP_UUID
+
+
+Syntax: INTERSECT_BITMAP_UUID(column_to_count, column_to_filter, filter_value_list)
+
+Description: Returning a string which points to a hidden serialized bitmap. The bitmap contains the result of finding intersection based on filter column, and then de-duplicating based on count column.
+
+Parameters:
+- `column_to_count` , the column to be calculated and applied on distinct value required to be added as **Precise count distinct** measure.
+- `column_to_filter`, the varied dimension.
+- `filter_value_list`, the value of the varied dimensions listed in `array[]`, When `column_to_filter` is of type varchar, A single element in an array can map multiple values. By default, the '|' is split. You can set `kylin.query.intersect.separator` in `kylin.properties` to configure the separator, Can take value '|' or ',', default is '|'(Currently this parameter does not support the use of subquery results as parameters).
+
+For example:
+
+```sql
+-- LSTG_FORMAT_NAME is a column of VARCHAR(4096) varied dimension.
+--
+-- Return a string which points to a hidden serialized bitmap.
+-- The bitmap result is the de-duplicated seller id set who have transactions
+-- in either type 'FP-GTC' and 'Others', or type 'FP-non GTC' or 'Others'
+-- on New Year's Day. The bitmap can be used as an input to other bitmap functions.
+
+select intersect_bitmap_uuid(
+ LO_CUSTKEY, LO_SHIPMODE,
+ array['AIR', 'Others'])
+from SSB.P_LINEORDER
+```
+
+
+When the data type of varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
+```sql
+-- case 1
+select
+ intersect_bitmap_uuid(column_to_count,
+ column_to_filter,
+ array[cast(3.53 as double), cast(5.79 as double)])
+from TABLE_NAME;
+
+-- case 2
+select
+ intersect_bitmap_uuid(column_to_count,
+ column_to_filter,
+ array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45'])
+from TABLE_NAME;
+```
+
+
+### INTERSECT_BITMAP_UUID_V2
+
+Syntax: intersect_bitmap_uuid_v2(column_to_count, column_to_filter, filter_value_list, filter_type)
+
+Description: Return a string which points to a hidden serialized bitmap. The bitmap contains the result of finding intersection based on filter column, and then de-duplicating based on count column. Support Regexp in condition.
+
+Parameters:
+- `column_to_count` , the column to be calculated and applied on distinct value required to be added as **Precise count distinct** measure.
+- `column_to_filter`, the varied dimension.
+- `filter_value_list`, the value of the varied dimensions listed in `array[]`,
+- `filter_type`, the data type is String, which identifies the filter mode. There are currently two optional values "RAWSTRING" and "REGEXP". When the parameter value is "RAWSTRING", the filtering mode is precise filtering. When `column_to_filter` is a Varchar type, A single element in the array can be mapped with multiple values. By default, it is separated by '|'. You can use `kylin.query.intersect.separator` to configure the separator. And only support configuration in the `kylin.prop [...]
+
+For example:
+``` sql
+-- LSTG_FORMAT_NAME is a column of VARCHAR(4096) varied dimension.
+--
+-- Return a string which points to a hidden serialized bitmap.
+-- The regular expression can match 'FP-GTC', 'FP-non GTC' and 'Others',
+-- The bitmap result is the de-duplicated seller id set who have transactions
+-- in either type 'FP-GTC' and 'Others', or type 'FP-non GTC' or 'Others'
+-- on New Year's Day. The bitmap can be used as an input to other bitmap functions.
+
+select intersect_bitmap_uuid_v2(
+ LO_CUSTKEY, LO_SHIPMODE,
+ array['A*R', 'Other.*'], 'REGEXP')
+from SSB.P_LINEORDER
+```
+
+
+
+When the filter_type is "RAWSTRING" and the data type of varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
+```sql
+-- case 1
+select
+ intersect_bitmap_uuid_v2(column_to_count,
+ column_to_filter,
+ array[cast(3.53 as double), cast(5.79 as double)], 'RAWSTRING')
+from TEST_TABLE;
+
+-- case 2
+select
+ intersect_bitmap_uuid_v2(column_to_count,
+ column_to_filter,
+ array[TIMESTAMP'2012-01-02 11:23:45',
+ TIMESTAMP'2012-01-01 11:23:45'], 'RAWSTRING')
+from TEST_TABLE;
+```
+
+
+### INTERSECT_COUNT_BY_COL
+
+Syntax: intersect_count_by_col(Array[t1.c1,t2.c2 ...])
+
+Description: Find the intersection of the serialized input bitmaps. Then return the distinct count.
+
+Parameters:
+- `t1.c1, t2.c2 ...`, the list of input columns. Each column points to a serialized bitmap hidden from users. Function `bitmap_uuid` and `intersect_bitmap_uuid` and `intersect_bitmap_uuid_v2` can return the bitmap.
+
+For example:
+```sql
+-- Function `bitmap_uuid` and `intersect_bitmap_uuid` return two serialized bitmap.
+-- `intersect_count_by_col` then find the intersection on two bitmaps
+-- and return distinct count.
+
+select intersect_count_by_col(Array[t1.a1, t2.a2])
+from (select bitmap_uuid(LO_CUSTKEY) as a1 from SSB.P_LINEORDER) t1,
+ (select intersect_bitmap_uuid(LO_CUSTKEY, LO_SHIPMODE, array['AIR', 'Others']) as a2
+ from SSB.P_LINEORDER) t2
+```
+
+
+### Limitations
+
+**All the above functions don't support pushdown query**
diff --git a/website/docs/query/specification/data_type.md b/website/docs/query/specification/data_type.md
new file mode 100644
index 0000000000..0581166323
--- /dev/null
+++ b/website/docs/query/specification/data_type.md
@@ -0,0 +1,86 @@
+---
+title: Data Types
+language: en
+sidebar_label: Data Types
+pagination_label: Data Types
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - data types
+draft: false
+last_update:
+ date: 08/17/2022
+---
+
+Kylin supports a wide range of data types to meet various use case requirements. In this chapter, we provide an overview of the data types supported by Kylin, covering different categories such as numeric, string, date, and more specialized data formats. These data types are essential for ensuring compatibility and efficiency in query execution and data storage.
+
+### Supported Data Types
+
+| Data Types | Description | Range of Numbers |
+|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
+| tinyint | Small integer numbers. | (-128,127) |
+| smallint | Small integer numbers. | (-32,768,32,767) |
+| int/integer | Integer numbers. | (-2,147,483,648,2,147,483,647) |
+| bigint | Large integer numbers. | (-9,223,372,036,854,775,808,9,223,372,036,854,775,807) |
+| float | Single-precision floating point numbers. | (-3.402823466E+38,-1.175494351E-38),0,(1.175494351E-38,3.402823466351E+38) |
+| double | Double-precision floating point numbers. | (-1.7976931348623157E+308,-2.2250738585072014E-308),0,(2.2250738585072014E-308,1.797693134 8623157E+308) |
+| decimal | An exact numeric data type defined by its *precision* (total number of digits) and *scale* (number of digits to the right of the decimal point). | --- |
+| timestamp | Values comprising values of fields year, month, day, hour, minute, and second, with the session local time-zone. The timestamp value represents an absolute point in time. | --- |
+| date | Values comprising values of fields year, month and day, without a time-zone | --- |
+| varchar | Variable length string | --- |
+| char | Fixed length string | --- |
+| boolean | Boolean values | --- |
+
+:::warning Note
+When working with double type data, there is a potential issue with precision accuracy. This is due to the way floating-point numbers are represented in computer systems, which can lead to rounding errors or small inaccuracies in calculations, especially when dealing with very large or very small values. It's important to be mindful of this limitation when performing operations that require high precision, and consider alternative data types such as `decimal` for cases where exact accura [...]
+:::
+
+
+
+### Example of Date
+
+Three methods are available for querying date types. The following examples demonstrate how to query the `LO_ORDERDATE` field in the `SSB.P_LINEORDER` table.
+
+**Method 1: Date Literal**
+
+```sql
+SELECT
+ LO_LINENUMBER,
+ LO_ORDERDATE,
+ LO_ORDTOTALPRICE
+FROM
+ SSB.P_LINEORDER
+WHERE
+ LO_ORDERDATE = DATE '1992-06-03';
+```
+
+**Method 2: Explicit Date Cast**
+
+```sql
+SELECT
+ LO_LINENUMBER,
+ LO_ORDERDATE,
+ LO_ORDTOTALPRICE
+FROM
+ SSB.P_LINEORDER
+WHERE
+ LO_ORDERDATE = CAST('1992-06-03' AS DATE);
+```
+
+**Method 3: Implicit Date Cast**
+
+```sql
+SELECT
+ LO_LINENUMBER,
+ LO_ORDERDATE,
+ LO_ORDTOTALPRICE
+FROM
+ SSB.P_LINEORDER
+WHERE
+ LO_ORDERDATE = '1992-06-03';
+```
+:::info NOTE
+The implicit date cast method relies on Kylin to automatically convert the string to a date. While this method is convenient, it may not always produce the desired results, especially when working with dates in different formats. The explicit date cast method provides more control over the conversion process.
+:::
diff --git a/website/docs/query/specification/functions.md b/website/docs/query/specification/functions.md
new file mode 100644
index 0000000000..586061c165
--- /dev/null
+++ b/website/docs/query/specification/functions.md
@@ -0,0 +1,188 @@
+---
+title: Basic Functions
+language: en
+sidebar_label: Basic Functions
+pagination_label: Basic Functions
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - functions
+draft: false
+last_update:
+ date: 08/17/2022
+---
+
+
+This chapter introduces basic functions applicable to SQL statements.
+
+### Arithmetic functions
+
+| Syntax | Description | Example | Model | Push down | Computed Column |
+|-------------------------------|----------------------------------------------------------------------------------------------------------------------|---------------------------------------|-------|-----------|-----------------|
+| ABS(num) | Returns the absolute value of *num* | ABS(-2) = 2 | ⎷️ | ⎷️ | ⎷️ |
+| CEIL(num) | Rounds *num* up, returning the smallest integer that is greater than or equal to *num* | CEIL(-2.2) = -2 | ⎷️ | ⎷️ | ⎷️ |
+| FLOOR(num) | Rounds *num* down, returning the largest integer that is less than or equal to *num* | FLOOR(-2.2) = -3 | ⎷️ | ⎷️ | ⎷️ |
+| MOD(num1, num2) | Returns the remainder (modulus) of *num1* divided by *num2*. The result is negative only if *num1* is negative | MOD(-3, 2) = -1 | ⎷️ | ⎷️ | ✕ |
+| SQRT(num) | Returns the square root of *num* | SQRT(16) = 4.0 | ⎷️ | ⎷️ | ⎷️ |
+| CBRT(num) | Returns the cube root of *num* | CBRT(27.0) = 3.0 | ⎷️ | ⎷️ | ⎷️ |
+| HYPOT(num1, num2) | Returns the Euclidean distance of *num1* and *num2* | HYPOT(3, 4) = 5.0 | ⎷️ | ⎷️ | ⎷️ |
+| LN(num) | Returns the natural logarithm (base *e*) of *num* | LN(2) = 0.6931471805599453 | ⎷️ | ⎷️ | ⎷️ |
+| LOG(base, num) | Returns the logarithm of *num* with *base* | LOG(10, 100) = 2.0 | ⎷️ | ⎷️ | ⎷️ |
+| LOG10(num) | Returns the base 10 logarithm of *numeric* | LOG10(100) = 2.0 | ⎷️ | ⎷️ | ⎷️ |
+| LOG1P(num) | Returns *ln(1 + num)* | LOG1P(0) = 0.0 | ⎷️ | ⎷️ | ⎷️ |
+| LOG2(num) | Returns the logarithm of *num* with base 2 | LOG2(2) = 1.0 | ⎷️ | ⎷️ | ⎷️ |
+| EXP(num) | Returns *e* raised to the power of *num* | EXP(1) = 2.718281828459045 | ⎷️ | ⎷️ | ⎷️ |
+| EXPM1(num) | Returns exp(*num*) - 1 | EXPM1(0) = 0.0 | ⎷️ | ⎷️ | ⎷️ |
+| POWER(num1, num2) | Returns *num1* raised to the power of *num2* | OWER(5,2) = 25.0 | ⎷️ | ⎷️ | ⎷️ |
+| RAND(\[seed\]) | Generates a random double between 0 and 1 inclusive, optionally initializing the random number generator with *seed* | RAND(15) = 0.45951471073476047 | ✕ | ⎷️ | ✕ |
+| COS(num) | Returns the cosine of *num* | COS(5) = 0.28366218546322625 | ⎷️ | ⎷️ | ⎷️ |
+| SIN(num) | Returns the sine of *num* | SIN(5) = -0.9589242746631385 | ⎷️ | ⎷️ | ⎷️ |
+| TAN(num) | Returns the tangent of *num* | TAN(5) = -3.380515006246586 | ⎷️ | ⎷️ | ⎷️ |
+| COT(num) | Returns the cotangent of *num* | COT(5) = -0.2958129155327455 | ⎷️ | ⎷️ | ⎷️ |
+| ACOS(num) | Returns the arc cosine of *num* | ACOS(0.8) = 0.6435011087932843 | ⎷️ | ⎷️ | ⎷️ |
+| ASIN(num) | Returns the arc sine of *num* | ASIN(0.8) = 0.9272952180016123 | ⎷️ | ⎷️ | ⎷️ |
+| ATAN(num) | Returns the arc tangent of *num* | ATAN(0.8) = 0.6747409422235527 | ⎷️ | ⎷️ | ⎷️ |
+| ATAN2(num1, num2) | Returns the arc tangent of the *num* coordinates | ATAN2(0.2, 0.8) = 0.24497866312686414 | ⎷️ | ⎷️ | ⎷️ |
+| COSH(num) | Returns the hyperbolic cosine of *num* | COSH(0) = 1.0 | ⎷️ | ⎷️ | ⎷️ |
+| SINH(num) | Returns hyperbolic sine of *num* | SINH(0) = 0.0 | ⎷️ | ⎷️ | ⎷️ |
+| TANH(num) | Returns the hyperbolic tangent of *num* | TANH(0) = 0.0 | ⎷️ | ⎷️ | ⎷️ |
+| DEGREES(num) | Converts *num* from radians to degrees | DEGREES(5) = 286.4788975654116 | ⎷️ | ⎷️ | ⎷️ |
+| PI | Returns a value that is closer than any other value to *pi* | PI = 3.141592653589793 | ⎷️ | ✕ | ✕ |
+| RADIANS(num) | Converts *num* from degrees to radians | RADIANS(90) = 1.5707963267948966 | ⎷️ | ⎷️ | ⎷️ |
+| BROUND(num1, int1) | Returns *num1* rounded to *int1* decimal places using HALF_EVEN rounding mode | BROUND(2.5, 0) = 2.0 | ⎷️ | ⎷️ | ⎷️ |
+| ROUND(num1, int1) | Returns *num1* rounded to *int1* decimal places using HALF_UP rounding mode | ROUND(2.5, 0) = 3 | ⎷️ | ⎷️ | ⎷️ |
+| RINT(num) | Returns the double value that is closest in value to the argument and is equal to a mathematical integer | RINT(12.3456) = 12.0 | ⎷️ | ⎷️ | ⎷️ |
+| SIGN(num) | Returns the signum of *num* | SIGN(-5) = -1.0 | ⎷️ | ⎷️ | ⎷️ |
+| CONV(num, from_base, to_base) | Convert *num* from base *from_base* to base *to_base* | CONV(-10, 16, -10) = -16 | ⎷️ | ⎷️ | ⎷️ |
+| CONV(str, from_base, to_base) | Convert *str* (implicit numeric type) from base *from_base* to base *to_base* | CONV('100', 2, 10) = 4 | ⎷️ | ⎷️ | ⎷️ |
+| TRUNCATE(num1, num2) | Truncates *num1* to optionally *num2*(if not specified 0) places right to the decimal point | TRUNCATE(5.55555,2) = 5.5 | ⎷️ | ⎷️ | ⎷️ |
+| FACTORIAL(num) | Returns the factorial of *num*. The *num* is between 0 and 20. Otherwise, null | FACTORIAL(5) = 120 | ⎷️ | ⎷️ | ⎷️ |
+
+:::warning NOTE
+If the parameter of the **POWER** function is a constant conversion, like *CAST(2 AS DOUBLE)*, it may fail to be recommended as computed column.
+:::
+
+
+
+
+### Character functions
+
+| Syntax | Description | Example [...]
+|---------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------- [...]
+| CHAR_LENGTH(str)<br/>CHARACTER_LENGTH(str) | Returns the number of characters in a character string | CHAR_LENGTH('Kylin') = 5<br/><br/>CHA [...]
+| UPPER(str) | Returns a character string converted to upper case | UPPER('Kylin') = KYLIN [...]
+| LOWER(str) | Returns a character string converted to lower case | LOWER('Kylin') = kylin [...]
+| POSITION(str1 IN str2) | Returns the position of the first occurrence of *str1* in *str2* | POSITION('Kyli' IN 'Kylin') = 1 [...]
+| TRIM( \{ BOTH \| LEADING \| TRAILING \} str1 FROM str2) | Removes the longest string containing only the characters in *str1* from the both ends/start/end of *str2* | TRIM(BOTH '1' FROM '1Kylin1') = Kylin [...]
+| OVERLAY(str1 PLACING str2 FROM integer \[ FOR pos \]) | Replaces a substring of *str1* with *str2* starting at the integer bit *pos* | OVERLAY('111' placing 'KYLIN' FROM 2 [...]
+| SUBSTRING(str FROM pos) | Returns a substring of a character string *str* starting at a given position *pos* | SUBSTRING('Kylin' FROM 5) = n [...]
+| SUBSTRING(str FROM pos FOR len) | Returns a substring of a character string *str* starting at a given position *pos* with a given length *len* | SUBSTRING('KYlin' from 5 for 2) = n [...]
+| INITCAP(str) | Returns *str* with the first letter of each word converter to upper case and the rest to lower case. Words are sequences of alphanumeric characters separated by non-alphanumeric characters | INITCAP('kylin') = Kylin [...]
+| REPLACE(str, ptn, replacement) | Returns a string in which all the occurrences of *ptn* in *str* are replaced with *replacement*; if *replacement* is the empty string, the occurrences of *ptn* are removed | REPLACE('Kylin','Kyli','Kyliiiiiii') [...]
+| BASE64(bin) | Converts the argument from a binary *bin* to a base 64 string | BASE64('Spark SQL') = U3BhcmsgU1FM [...]
+| DECODE(bin, charset) | Decodes the first argument *bin* using the given *charset*, *charset* is one of \['US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16'\]. If either argument is null, the result will also be null | DECODE(ENCODE('abc', 'utf-8'), 'utf-8 [...]
+| ENCODE(str, charset) | Encodes the first argument *str* using the given *charset*, *charset* is one of \['US-ASCII', 'ISO-8859-1', 'UTF-8', 'UTF-16BE', 'UTF-16LE', 'UTF-16'\]. If either argument is null, the result will also be null | ENCODE('abc', 'utf-8') = \[B@2b442236 [...]
+| FIND_IN_SET(str, str_array) | Returns the index (1-based) of the given string (*str*) in the comma-delimited list (*str_array*).Returns 0, if the string was not found or if the given string (*str*) contains a comma | FIND_IN_SET('ab','abc,b,ab,c,def') = [...]
+| LCASE(str) | Returns *str* with all characters changed to lowercase | LCASE('SparkSql') = sparksql [...]
+| LEVENSHTEIN(str1, str2) | Returns the Levenshtein distance between the two given strings | LEVENSHTEIN('kitten', 'sitting') = 3 [...]
+| LOCATE(ptn, str\[, pos\]) | Returns the position of the first occurrence of *ptn* in *str* after position *pos*. The given *pos* and return value are 1-based | LOCATE('bar', 'foobarbar') = 4 <br/>< [...]
+| LPAD(str, len, pad) | Returns *str*, left-padded with *pad* to a length of *len*.If *str* is longer than *len*, the return value is shortened to *len* characters | LPAD('hi', 5, '??') = ???hi [...]
+| RPAD(str, len, pad) | Returns *str*, right-padded with *pad* to a length of *len*. If *str* is longer than *len*, the return value is shortened to *len* characters | RPAD('hi', 5, '??') = hi??? [...]
+| RTRIM(trimStr, str) | Removes the trailing string which contains the characters from the trim string from the *str* | RTRIM('KR', 'SPARK') = SPA [...]
+| SENTENCES(str) | Splits *str* into an array of array of words. | SENTENCES('Hi there! Good morning.') [...]
+| SUBSTRING_INDEX(str, delim, count) | Returns the substring from *str* before *count* occurrences of the delimiter *delim*. If *count* is positive, everything to the left of the final delimiter (counting from the left) is returned. If *count* is negative, everything to the right of the final delimiter (counting from the right) is returned. The function substring_index performs a case-sensitive match when searching for *delim* | SUBSTRING_INDEX('www.apache.org', '.' [...]
+| UCASE(str) | Returns *str* with all characters changed to uppercase | UCASE('SparkSql') = SPARKSQL [...]
+| UNBASE64(str) | Converts the argument from a base 64 string *str* to a binary | UNBASE64('U3BhcmsgU1FM') = \[B@7c6682 [...]
+| ASCII(str) | Convert character to corresponding ascii code | ASCII('a') = 97 [...]
+| CHR(str) | Convert ascii code to corresponding character | CHR(97) = a [...]
+| SPACE(len) | Generate *len* number of continuous space | space(2) = □□<br/><br/> □ means one s [...]
+| SPLIT_PART(str, separator, index) | Split *str* with *separator* and return the *index*-th token. *index* counts from 1. when *index* is negative, tokens are counted starting from the right | SPLIT_PART('a-b-c', '-', 1) = a<br/>< [...]
+| CONCAT(any\[, any]*) | Concatenates multiple data of any type into a string | CONCAT('Kyl', 'in') = Kylin [...]
+| REPEAT(str,n) | Repeat *str* with *n* times and return string. When querying the model, *str* supports passing in constants, columns and expressions, and *n* only supports passing in constants | REPEAT('kylin',2) = kylinkylin [...]
+| LEFT(str,n) | Return the *n* characters from the left of *str*. When querying the model, *str* supports passing in constants, columns, and *n* only supports passing in constants | LEFT('kylin',2) = ky [...]
+
+
+### Date/time functions
+
+| Syntax | Description | Example | Model | Push Down | Computed Column |
+|-------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|-------|-----------|-----------------|
+| CURRENT_DATE | Returns the current date in the session time zone, in a value of datatype DATE | CURRENT_DATE = 2018-10-10 | ⎷️ | ⎷️ | ✕ |
+| CURRENT_TIMESTAMP | Returns the current timestamp in the session time zone, in a value of datatype timestamp | CURRENT_TIMESTAMP = 2022-07-19 10:24:44.708 | ⎷️ | ⎷️ | ✕ |
+| EXTRACT(timeUnit FROM datetime) | Extracts and returns the value of a specified datetime field from a datetime value expression | EXTRACT(minute FROM timestamp '2018-10-10 11:47:16') = 47 | ⎷️ | ⎷️ | ⎷️ |
+| FLOOR(datetime TO timeUnit) | Rounds *datetime* down to *timeUnit* where *timeunit* can be one of \[year, quarter, month, week, day, hour, minute, second\] | FLOOR(timestamp '2018-10-10 11:47:16' TO year) = 2018-01-01 00:00:00 | ⎷️ | ⎷️ | ⎷️ |
+| CEIL(datetime TO timeUnit) | Rounds *datetime* up to *timeUnit* where *timeunit* can be one of \[year, quarter, month, week, day, hour, minute, second\] | CEIL(timestamp '2018-10-10 11:47:16' TO minute) = 2018-10-10 11:48:00 | ⎷️ | ⎷️ | ⎷️ |
+| YEAR(date) | Equivalent to *EXTRACT(YEAR FROM date)*. Returns an integer | YEAR(date '2019-01-02') = 2019 | ⎷️ | ⎷️ | ⎷️ |
+| QUARTER(date) | Equivalent to *EXTRACT(QUARTER FROM date)*. Returns an integer between 1 and 4 | QUARTER(date '2019-01-02') = 1 | ⎷️ | ⎷️ | ⎷️ |
+| NOW(date) | Returns the current timestamp at the start of query evaluation | NOW() = 2019-09-24 17:19:09.932 | ✕ | ⎷️ | ⎷️ |
+| MONTH(date) | Equivalent to *EXTRACT(MONTH FROM date)*. Returns an integer between 1 and 12 | MONTH(date '2019-01-02') = 1 | ⎷️ | ⎷️ | ⎷️ |
+| WEEK(date) | Equivalent to *EXTRACT(WEEK FROM date)*. Returns an integer between 1 and 53 | WEEK(date '2019-01-02') = 1 | ⎷️ | ⎷️ | ⎷️ |
+| DAYOFYEAR(date) | Equivalent to *EXTRACT(DOY FROM date)*. Returns an integer between 1 and 366 | DAYOFYEAR(date '2019-10-03') = 276 | ⎷️ | ⎷️ | ⎷️ |
+| DAYOFMONTH(date) | Equivalent to *EXTRACT(DAY FROM date)*. Returns an integer between 1 and 31 | DAYOFMONTH(date '2019-10-03') = 3 | ⎷️ | ⎷️ | ⎷️ |
+| DAYOFWEEK(date) | Equivalent to *EXTRACT(DOW FROM date)*. Returns an integer between 1 and 7 | DAYOFWEEK(date '2019-10-03') = 5 | ⎷️ | ⎷️ | ⎷️ |
+| HOUR(date) | Equivalent to *EXTRACT(HOUR FROM date)*. Returns an integer between 0 and 23 | HOUR(timestamp '2019-01-02 14:01:50') = 14 | ⎷️ | ⎷️ | ⎷️ |
+| MINUTE(date) | Equivalent to *EXTRACT(MINUTE FROM date)*. Returns an integer between 0 and 59 | MINUTE(timestamp '2019-01-02 14:01:50') = 1 | ⎷️ | ⎷️ | ⎷️ |
+| SECOND(date) | Equivalent to *EXTRACT(SECOND FROM date)*. Returns an integer between 0 and 59 | SECOND(timestamp '2019-01-02 14:01:50') = 50 | ⎷️ | ⎷️ | ⎷️ |
+| TIMESTAMPADD(timeUnit, integer, datetime) | Returns *datetime* with an interval of (signed) *integer* *timeUnit*s added. Equivalent to 'datetime + INTERVAL integer timeUnit' | TIMESTAMPADD(month, 1, '2018-10-10') = 2018-11-10 | ⎷️ | ⎷️ | ⎷️ |
+| TRUNC(date, fmt) | Returns date with the time portion of the day truncated to the unit specified by the format model *fmt*. *fmt* should be one of \[year, yyyy, yy, mon, month, mm\] | TRUNC(date '2009-02-12', 'MM') = 2009-02-01 | ⎷️ | ⎷️ | ⎷️ |
+| ADD_MONTHS(start_date, num_months) | Returns the date that is *num_months* after *start_date* | ADD_MONTHS(date '2016-08-31', 1) = 2016-09-30 | ⎷️ | ⎷️ | ⎷️ |
+| DATE_ADD(start_date, num_days) | Returns the date that is *num_days* after *start_date* | DATE_ADD(date '2016-07-30', 1) = 2016-07-31 | ⎷️ | ⎷️ | ⎷️ |
+| DATE_SUB(start_date, num_days) | Returns the date that is *num_days* before *start_date* | DATE_SUB(date '2016-07-30', 1) = 2016-07-29 | ⎷️ | ⎷️ | ⎷️ |
+| FROM_UNIXTIME(unix_time, format) | Returns *unix_time* in the specified *format* | FROM_UNIXTIME(0, 'yyyy-MM-dd HH:mm:ss') = 1970-01-01 00:00:00 | ⎷️ | ⎷️ | ⎷️ |
+| FROM_UTC_TIMESTAMP(timestamp, timezone) | Given a timestamp like '2017-07-14 02:40:00.0', interprets it as a time in UTC, and renders that time as a timestamp in the given time zone | FROM_UTC_TIMESTAMP('2016-08-31', 'Asia/Seoul') = 2016-08-31 09:00:00 | ⎷️ | ⎷️ | ⎷️ |
+| MONTHS_BETWEEN(timestamp1, timestamp2) | If *timestamp1* is later than *timestamp2*, then the result is positive. If *timestamp1* and *timestamp2* are on the same day of month, or both are the last day of month, time of day will be ignored. Otherwise, the difference is calculated based on 31 days per month | MONTHS_BETWEEN('1997-02-28 10:30:00', '1996-10-30') = 3.94959677 | ⎷️ | ⎷️ | ⎷️ |
+| TO_UTC_TIMESTAMP(timestamp, timezone) | Given a timestamp like '2017-07-14 02:40:00.0', interprets it as a time in the given time zone, and renders that time as a timestamp in UTC | FROM_UTC_TIMESTAMP(timestamp '2015-03-02 06:05:00', 'America/Toronto') = 2015-03-02 01:05:00.0 | ⎷️ | ✕ | ⎷️ |
+| UNIX_TIMESTAMP(datetime, fmt) | Returns the seconds from '1970-01-01 08:00:00' to *datetime*. Please specify the format *fmt* of *datetime* | UNIX_TIMESTAMP('2016-04-08 09:00:00', 'yyyy-MM-dd HH:mm:ss') = 1460106000 | ⎷️ | ⎷️ | ⎷️ |
+| DATEDIFF(endDate, startDate) | Returns the number of days from *startDate* to *endDate* | DATEDIFF(date '2022-02-03', date '2022-02-01') = 2 | ⎷️ | ⎷️ | ⎷️ |
+
+
+### Conditional functions
+
+| Syntax | Description | Example | Model | Push Down | Computed Column |
+|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|-------|-----------|-----------------|
+| CASE value WHEN value1 THEN result1 WHEN valueN THEN resultN ELSE resultZ END | Simple case | CASE OPS_REGION WHEN 'Beijing' THEN 'BJ' WHEN 'Shanghai' THEN 'SH' WHEN 'Hongkong' THEN 'HK' END FROM KYLIN_SALES = HK SH BJ | ⎷️ | ⎷️ | ⎷️ |
+| CASE WHEN condition1 THEN result1 WHEN conditionN THEN resultN ELSE resultZ END | Searched case | CASE WHEN OPS_REGION ='Beijing'THEN 'BJ' WHEN OPS_REGION ='Shanghai' THEN 'SH' WHEN OPS_REGION = 'Hongkong' THEN 'HK' END FROM KYLIN_SALES = HK SH BJ | ⎷️ | ⎷️ | ⎷️ |
+| NULLIF(value, value) | Return NULL if the values are the same. Otherwise, return the first value | NULLIF(5,5) = null | ⎷️ | ⎷️ | ⎷️ |
+| COALESCE(value, value \[, value \]*) | Return the first not null value | COALESCE(NULL,NULL,5) = 5 | ⎷️ | ⎷️ | ⎷️ |
+| IFNULL(value1, value2) | Return value2 if value1 is NULL. Otherwise, return value1 | IFNULL('kylin','apache') = 'kylin' | ⎷️ | ⎷️ | ⎷️ |
+| ISNULL(value) | Return true if value is NULL. Otherwise, return false | ISNULL('kylin') = false | ⎷️ | ⎷️ | ⎷️ |
+| NVL(value1, value2) | Return value2 if value1 is NULL. Otherwise, return value1. Value1, value2 must have same data type | NVL('kylin','apache') = 'kylin' | ⎷️ | ⎷️ | ⎷️ |
+
+
+### Miscellaneous functions
+
+| Syntax | Description | Example | Model | Push Down | Computed Column |
+|------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|-------|-----------|-----------------|
+| UUID() | Returns an universally unique identifier (UUID) string. The value is returned as a canonical UUID 36-character string | UUID() = 46707d92-02f4-4817-8116-a4c3b23e6266 | ✕ | ⎷️ | ✕ |
+| MONOTONICALLY<br/>_INCREASING_ID() | Returns monotonically increasing 64-bit integers. The generated ID is guaranteed to be monotonically increasing and unique, but not consecutive | MONOTONICALLY_INCREASING_ID() = 1111111 | ⎷️ | ⎷️ | ✕ |
+| EXPLODE(array) | Returns new rows for each element in the given array column | EXPLODE(array\[1, 2, 3\]) =<br/>1<br/>2<br/>3 | ⎷️ | ✕ | ✕ |
+| SIZE(expr) | Expr must be of type array or map and return the number of elements contained in array or map | SIZE(array\[1, 2, 3\]) = 3 | ⎷️ | ⎷️ | ✕ |
+
+
+### Type conversion functions
+
+| Syntax | Description | Example | Model | Push Down | Computed Column |
+|---------------------|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|-------|-----------|-----------------|
+| CAST(value AS type) | Converts a value to a given type | CAST(CURRENT_DATE as varchar) = 2018-10-10 | ⎷️ | ⎷️ | ⎷️ |
+| DATE\<String\> | Converts a string to DATE type,<br />equaling to CAST(string AS date) | DATE '2018-10-10' = 2018-10-10<br/><br/>MONTH(DATE '2018-10-10') = 10 | ⎷️ | ⎷️ | ✕ |
+| TIMESTAMP\<String\> | Converts a string to TIMESTAMP type,<br />equaling to CAST(string AS timestamp) | TIMESTAMP '2018-10-10 15:57:07 = 2018-10-10 15:57:07<br/><br/>SECOND(TIMESTAMP '2018-10-10 15:57:07') = 7 | ⎷️ | ⎷️ | ✕ |
+
+:::info NOTE
+1. Only the following types of conversions are supported: char, varchar, boolean, int, integer, tinyint, smallint, bigint, float, double, decimal, numeric, date, time, timestamp
+2. However, conversion from **bigint** to **timestamp** is not supported at this time
+3. If converting from **char** to **int**, non-numeric values in **char** will return null
+4. Length n does not take effect when other data types are converted to **char(n) or varchar(n)**
+:::
+
+### Aggregate functions
+
+| Syntax | Description | Example | Model | Push Down | Computed Column |
+|----------------------|----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------|-------|-----------|-----------------|
+| AVG(numeric) | Returns the average (arithmetic mean) of *numeric* across all input values | SELECT AVG(PRICE) FROM KYLIN_SALES;<br/><br/>49.23855638491023 | ⎷️ | ⎷️ | ✕ |
+| SUM(numeric) | Returns the sum of *numeric* across all input values | SELECT SUM(PRICE) FROM KYLIN_SALES;<br/><br/>244075.5240 | ⎷️ | ⎷️ | ✕ |
+| MAX(value) | Returns the maximum value of *value* across all input values | SELECT MAX(PRICE) FROM KYLIN_SALES;<br/><br/>99.9865 | ⎷️ | ⎷️ | ✕ |
+| MIN(value) | Returns the minimum value of *value* across all input values | SELECT MIN(PRICE) FROM KYLIN_SALES;<br/><br/>0.0008 | ⎷️ | ⎷️ | ✕ |
+| COUNT(value) | Returns the number of input rows for which *value* is not null (wholly not null if *value* is composite) | SELECT count(PRICE) FROM KYLIN_SALES;<br/><br/>4957 | ⎷️ | ⎷️ | ✕ |
+| COUNT(*) | Returns the number of input rows | SELECT COUNT(*) FROM KYLIN_COUNTRY;<br/><br/>244 | ⎷️ | ⎷️ | ✕ |
+| CORR(value1, value2) | Returns the correlation of two columns | SELECT CORR(ITEM_COUNT, PRICE) FROM KYLIN_SALES<br/><br/>0.1278 | ⎷️ | ⎷️ | ✕ |
diff --git a/website/docs/query/specification/grouping_function.md b/website/docs/query/specification/grouping_function.md
new file mode 100644
index 0000000000..ea61f1fb32
--- /dev/null
+++ b/website/docs/query/specification/grouping_function.md
@@ -0,0 +1,100 @@
+---
+title: Multi-Dimension Analysis
+language: en
+sidebar_label: Multi-Dimension Analysis
+pagination_label: Multi-Dimension Analysis
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - grouping function
+draft: false
+last_update:
+ date: 09/13/2024
+---
+
+Users can utilize grouping functions to aggregate data by different keys within a single SQL statement. ROLLUP, CUBE, and GROUPING SETS are commonly used grouping and aggregate methods. CUBE and ROLLUP functions can be considered special cases of GROUPING SETS.
+
+**Note that, in the current version, grouping functions are not supported as computed columns.**
+
+
+### GROUPING SETS(expression)
+
+In a result set, you sometimes need to aggregate columns A and B separately, and also aggregate the two columns together. The implementation method is often to use multiple UNION ALL statements. However, the GROUPING SETS function can use different grouping settings for aggregate queries at the same time. It can replace multiple UNION ALL statements, making SQL statements more convenient and efficient.
+
+The GROUPING SETS function is often used in the GROUP BY clause. The expression is filled with the combination of dimensions that need to be grouped. For example, GROUPING SETS ((A, B), (C), ()) means to do aggregation with both columns A and B, aggregation with column C and aggregation with no grouping.
+
+For example:
+```sql
+SELECT LO_CUSTKEY, LO_ORDERKEY, SUM(LO_ORDTOTALPRICE) AS PRICE
+FROM SSB.P_LINEORDER
+GROUP BY GROUPING SETS((LO_CUSTKEY,LO_ORDERKEY),(LO_ORDERKEY),());
+
+-- the equivalent sql
+SELECT LO_CUSTKEY, LO_ORDERKEY, SUM(LO_ORDTOTALPRICE) AS PRICE
+FROM SSB.P_LINEORDER
+GROUP BY LO_CUSTKEY, LO_ORDERKEY
+
+UNION ALL
+SELECT NULL AS LO_CUSTKEY, LO_ORDERKEY, SUM(LO_ORDTOTALPRICE) AS PRICE
+FROM SSB.P_LINEORDER
+GROUP BY LO_ORDERKEY
+
+UNION ALL
+SELECT NULL AS LO_CUSTKEY, NULL AS LO_ORDERKEY, SUM(LO_ORDTOTALPRICE) AS PRICE
+FROM SSB.P_LINEORDER;
+
+```
+
+
+
+
+### GROUPING(expression)
+
+In the results generated by grouping functions, `NULL` is used as a placeholder. As a result, it can be difficult to distinguish between `NULL` as a placeholder and `NULL` as part of the original data.
+
+The `GROUPING` function helps differentiate between these two cases. It identifies whether a `NULL` value in the result set is a placeholder or actual data.
+
+The columns involved in grouping can be passed into the `GROUPING` function. If the function returns `0`, the `NULL` value in the corresponding row comes from the original data. If it returns `1`, the `NULL` is a placeholder introduced by the grouping function.
+
+For example:
+```sql
+SELECT
+ LO_CUSTKEY,
+ LO_ORDERKEY,
+ SUM(LO_ORDTOTALPRICE) AS PRICE,
+ GROUPING(LO_CUSTKEY) AS GC,
+ GROUPING(LO_ORDERKEY) AS GM
+FROM SSB.P_LINEORDER
+GROUP BY
+ GROUPING SETS((LO_CUSTKEY,LO_ORDERKEY),(LO_ORDERKEY),());
+```
+
+You can see that the result of the GROUPING function in both columns in the first row is 1, indicating that the NULL in the two columns LO_CUSTKEY and LO_ORDERKEY in this row are placeholders due to the GROUPING SETS function.
+
+
+
+
+### CUBE(expression)
+
+`CUBE` performs group aggregation on all specified columns and ultimately provides the overall total aggregation result. The columns used in the expression are expanded into all possible combinations. For example, `GROUP BY CUBE (a, b, c)` is equivalent to `GROUPING SETS ((a, b, c), (a, b), (a, c), (b, c), (a), (b), (c), ())`.
+
+
+
+### ROLLUP(expression)
+
+`ROLLUP` performs group aggregation starting with the first column and ultimately provides the overall total aggregation. The columns in the expression are broken down into hierarchical combinations. For example, `GROUP BY ROLLUP (a, b, c)` is equivalent to `GROUPING SETS ((a, b, c), (a, b), (a), ())`.
+
+For example:
+```sql
+SELECT
+ LO_CUSTKEY,
+ LO_ORDERKEY,
+ SUM(LO_ORDTOTALPRICE) AS PRICE
+FROM SSB.P_LINEORDER
+GROUP BY
+ ROLLUP(LO_CUSTKEY, LO_ORDERKEY);
+```
+
+
diff --git a/website/docs/query/insight/operator_function/function/images/bitmap_uuid.1.png b/website/docs/query/specification/images/bitmap_uuid.1.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/bitmap_uuid.1.png
rename to website/docs/query/specification/images/bitmap_uuid.1.png
diff --git a/website/docs/query/insight/operator_function/function/images/first_last_value.png b/website/docs/query/specification/images/first_last_value.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/first_last_value.png
rename to website/docs/query/specification/images/first_last_value.png
diff --git a/website/docs/query/insight/operator_function/function/images/grouping.png b/website/docs/query/specification/images/grouping.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/grouping.png
rename to website/docs/query/specification/images/grouping.png
diff --git a/website/docs/query/insight/operator_function/function/images/grouping_sets_function.png b/website/docs/query/specification/images/grouping_sets_function.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/grouping_sets_function.png
rename to website/docs/query/specification/images/grouping_sets_function.png
diff --git a/website/docs/query/insight/operator_function/function/images/intersect_bitmap_uuid.1.png b/website/docs/query/specification/images/intersect_bitmap_uuid.1.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/intersect_bitmap_uuid.1.png
rename to website/docs/query/specification/images/intersect_bitmap_uuid.1.png
diff --git a/website/docs/query/insight/operator_function/function/images/intersect_bitmap_uuid2.1.png b/website/docs/query/specification/images/intersect_bitmap_uuid2.1.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/intersect_bitmap_uuid2.1.png
rename to website/docs/query/specification/images/intersect_bitmap_uuid2.1.png
diff --git a/website/docs/query/insight/operator_function/function/images/intersect_count.1.png b/website/docs/query/specification/images/intersect_count.1.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/intersect_count.1.png
rename to website/docs/query/specification/images/intersect_count.1.png
diff --git a/website/docs/query/insight/operator_function/function/images/intersect_count.2.png b/website/docs/query/specification/images/intersect_count.2.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/intersect_count.2.png
rename to website/docs/query/specification/images/intersect_count.2.png
diff --git a/website/docs/query/insight/operator_function/function/images/intersect_count2.1.png b/website/docs/query/specification/images/intersect_count2.1.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/intersect_count2.1.png
rename to website/docs/query/specification/images/intersect_count2.1.png
diff --git a/website/docs/query/insight/operator_function/function/images/intersect_count_by_col.1.png b/website/docs/query/specification/images/intersect_count_by_col.1.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/intersect_count_by_col.1.png
rename to website/docs/query/specification/images/intersect_count_by_col.1.png
diff --git a/website/docs/query/insight/operator_function/function/images/intersect_value.1.png b/website/docs/query/specification/images/intersect_value.1.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/intersect_value.1.png
rename to website/docs/query/specification/images/intersect_value.1.png
diff --git a/website/docs/query/insight/operator_function/function/images/intersect_value.2.png b/website/docs/query/specification/images/intersect_value.2.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/intersect_value.2.png
rename to website/docs/query/specification/images/intersect_value.2.png
diff --git a/website/docs/query/insight/operator_function/function/images/intersect_value2.1.png b/website/docs/query/specification/images/intersect_value2.1.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/intersect_value2.1.png
rename to website/docs/query/specification/images/intersect_value2.1.png
diff --git a/website/docs/query/insight/operator_function/function/images/lead_lag.png b/website/docs/query/specification/images/lead_lag.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/lead_lag.png
rename to website/docs/query/specification/images/lead_lag.png
diff --git a/website/docs/query/insight/operator_function/function/images/ntile.png b/website/docs/query/specification/images/ntile.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/ntile.png
rename to website/docs/query/specification/images/ntile.png
diff --git a/website/docs/query/insight/operator_function/function/images/rank_and_drank.png b/website/docs/query/specification/images/rank_and_drank.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/rank_and_drank.png
rename to website/docs/query/specification/images/rank_and_drank.png
diff --git a/website/docs/query/insight/operator_function/function/images/rollup_function.png b/website/docs/query/specification/images/rollup_function.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/rollup_function.png
rename to website/docs/query/specification/images/rollup_function.png
diff --git a/website/docs/query/insight/operator_function/function/images/row_number.png b/website/docs/query/specification/images/row_number.png
similarity index 100%
rename from website/docs/query/insight/operator_function/function/images/row_number.png
rename to website/docs/query/specification/images/row_number.png
diff --git a/website/docs/query/specification/intersect_function.md b/website/docs/query/specification/intersect_function.md
new file mode 100644
index 0000000000..3be8e32ff9
--- /dev/null
+++ b/website/docs/query/specification/intersect_function.md
@@ -0,0 +1,211 @@
+---
+title: Intersect Functions
+language: en
+sidebar_label: Intersect Functions
+pagination_label: Intersect Functions
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - intersect functions
+draft: false
+last_update:
+ date: 09/13/2024
+---
+
+
+Users can use intersection function to calculate the value of the intersection of two data sets, with some same dimensions and one varied dimension, to analyze the retention or conversion rates.
+
+kylin supports the following intersection function,
+
+
+
+
+### INTERSECT_COUNT
+
+Syntax: intersect_count(column_to_count, column_to_filter, filter_value_list)
+
+Description: Returns the distinct count of the intersection of multiple result sets in different conditions
+
+Parameters:
+- `column_to_count`, the column to be calculated and applied on distinct count, required to be added as **Precise count distinct** measure
+- `column_to_filter`, the varied dimension
+- `filter_value_list`, the value of the varied dimensions listed in `array[]`, When `column_to_filter` is of type varchar, A single element in an array can map multiple values. By default, the '|' is split. You can set `kylin.query.intersect.separator` in `kylin.properties` to configure the separator, Can take value '|' or ',', default is '|'(Currently this parameter does not support the use of subquery results as parameters).
+
+
+Example 1:
+```sql
+-- The result shows that there is no seller keeps trading constantly during this period.
+
+select LO_SHIPMODE,
+ intersect_count(LO_CUSTKEY, LO_ORDERDATE, array[date '1992-01-01']) as first_day,
+ intersect_count(LO_CUSTKEY, LO_ORDERDATE, array[date '1992-01-02']) as second_day,
+ intersect_count(LO_CUSTKEY, LO_ORDERDATE, array[date '1992-01-03']) as third_day,
+ intersect_count(LO_CUSTKEY, LO_ORDERDATE,
+ array[date '1992-01-01', date '1992-01-02']) as retention_oneday,
+ intersect_count(LO_CUSTKEY, LO_ORDERDATE,
+ array[date '1992-01-01', date '1992-01-02',
+ date '1992-01-03']) as retention_twoday
+from SSB.P_LINEORDER
+where LO_ORDERDATE in (date '1992-01-01', date '1992-01-02', date '1992-01-03')
+group by LO_SHIPMODE
+```
+
+
+Example 2:
+
+```sql
+select
+ intersect_count(LO_CUSTKEY, LO_SHIPMODE,
+ array['RAIL|SHIP|TRUCK', 'TRUCK']) as test_column
+from SSB.P_LINEORDER
+ ```
+
+
+
+When the data type of varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
+```sql
+-- case 1:
+select intersect_count(column_to_count,
+ column_to_filter,
+ array[cast(3.53 as double), cast(5.79 as double)])
+from TEST_TABLE;
+
+-- case 2:
+select intersect_count(column_to_count,
+ column_to_filter,
+ array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45'])
+from TEST_TABLE;
+
+```
+
+
+### INTERSECT_VALUE
+
+Description: Returns the values of the intersection of multiple result sets in different conditions. If the returned result is large, it may cause the analysis page browser to crash.
+
+Syntax: intersect_value(column_to_count, column_to_filter, filter_value_list)
+
+Parameters:
+- `column_to_count`, the column to be calculated and applied on distinct value required to be added as **Precise count distinct** measure. **And only columns of type tinyint, smallint, or integer are supported**.
+- `column_to_filter`, the varied dimension
+- `filter_value_list`, the value of the varied dimensions listed in `array[]`, When `column_to_filter` is of type varchar, A single element in an array can map multiple values. By default, the '|' is split. You can set `kylin.query.intersect.separator` in `kylin.properties` to configure the separator, Can take value '|' or ',', default is '|'(Currently this parameter does not support the use of subquery results as parameters).
+
+Example 1:
+```sql
+-- Fact table `SSB.P_LINEORDER` simulates the online transaction data.
+-- And data type of `LO_CUSTKEY` column is `integer`. The following query
+-- can return the ids of sellers who are trading day by day during 1992.01.01 to 1992.01.03.
+
+-- The result shows that set of keeping trading constantly's sellerId during this period.
+
+select LO_SHIPMODE,
+intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-01']) as first_day,
+intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-02']) as second_day,
+intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-03']) as third_day,
+intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-01',date'1992-01-02']) as retention_oneday,
+intersect_value(LO_CUSTKEY, LO_ORDERDATE, array[date'1992-01-01',date'1992-01-02',date'1992-01-03']) as retention_twoday
+from SSB.P_LINEORDER
+where PART_DT in (date'1992-01-01',date'1992-01-02',date'1992-01-03')
+group by LO_SHIPMODE
+```
+
+
+Example 2:
+```sql
+select
+ intersect_count(LO_CUSTKEY, LO_SHIPMODE,
+ array['RAIL|SHIP|TRUCK', 'TRUCK']) as test_column
+from SSB.P_LINEORDER
+```
+
+
+When the data type of varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
+```sql
+-- case 1
+select intersect_value(column_to_count, column_to_filter,
+ array[cast(3.53 as double), cast(5.79 as double)])
+from TEST_TABLE
+
+-- case 2
+select intersect_value(column_to_count, column_to_filter,
+ array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45'])
+from TEST_TABLE;
+```
+
+
+### INTERSECT_COUNT_V2
+
+Syntax: intersect_count_v2(column_to_count, column_to_filter, filter_value_list, filter_type)
+
+Description: Returns the distinct count of the intersection of multiple result sets in different conditions. Support Regexp in condition.
+
+Parameters:
+- `column_to_count`, the column to be calculated and applied on distinct count, required to be added as **Precise count distinct** measure
+- `column_to_filter`, the varied dimension
+- `filter_value_list`, the value of the varied dimensions listed in `array[]`,
+- `filter_type`, the data type is String, which identifies the filter mode. There are currently two optional values "RAWSTRING" and "REGEXP". When the parameter value is "RAWSTRING", the filtering mode is precise filtering. When `column_to_filter` is a Varchar type, A single element in the array can be mapped with multiple values. By default, it is separated by '|'. You can use `kylin.query.intersect.separator` to configure the separator. And only support configuration in the `kylin.prop [...]
+
+For example:
+```sql
+select intersect_count_v2(
+ LO_CUSTKEY, LO_SHIPMODE,
+ array['R*L', 'TRU.*'], 'SHIP')
+from SSB.P_LINEORDER
+```
+
+
+When the filter_type is "RAWSTRING" and the data type of a varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
+```sql
+-- case 1
+select intersect_count_v2(column_to_count, column_to_filter,
+ array[cast(3.53 as double), cast(5.79 as double)], 'RAWSTRING')
+from TEST_TABLE
+
+
+-- case 2
+select intersect_count_v2(column_to_count, column_to_filter,
+ array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45'], 'RAWSTRING')
+from TEST_TABLE;
+```
+
+### INTERSECT_VALUE_V2
+
+Syntax: intersect_value_v2(column_to_count, column_to_filter, filter_value_list, filter_type)
+
+Description: Returns the values of the intersection of multiple result sets in different conditions. If the returned result is large, it may cause the analysis page browser to crash. Support Regexp in condition.
+
+Parameters:
+- `column_to_count`, the column to be calculated and applied on distinct value required to be added as **Precise count distinct** measure.
+ **Only when type of column is one of integer family(tinyint、smallint、integer、bigint) and override model properties `kylin.query.skip-encode-integer-enabled=true`, the values returned is actual. Otherwise, encoded value will be returned.**
+- `column_to_filter`, the varied dimension
+- `filter_value_list`, the value of the varied dimensions listed in `array[]`,
+- `filter_type`, the data type is String, which identifies the filter mode. There are currently two optional values "RAWSTRING" and "REGEXP". When the parameter value is "RAWSTRING", the filtering mode is precise filtering. When `column_to_filter` is a Varchar type, A single element in the array can be mapped with multiple values. By default, it is separated by '|'. You can use `kylin.query.intersect.separator` to configure the separator. And only support configuration in the `kylin.prop [...]
+
+For example:
+```sql
+select intersect_value_v2(
+ LO_CUSTKEY, LO_SHIPMODE,
+ array['R*L', 'TRU.*'], 'SHIP')
+from SSB.P_LINEORDER
+```
+
+
+When the filter_type is "RAWSTRING" and the data type of varied dimension is not varchar or integer, the values in 'filter_value_list' need to be explicitly cast, for example:
+```sql
+-- case 1
+select intersect_value_v2(column_to_count, column_to_filter,
+ array[cast(3.53 as double), cast(5.79 as double)], 'RAWSTRING')
+from TEST_TABLE;
+
+-- case 2
+select intersect_value_v2(column_to_count, column_to_filter,
+ array[TIMESTAMP'2012-01-02 11:23:45', TIMESTAMP'2012-01-01 11:23:45'], 'RAWSTRING')
+from TEST_TABLE;
+```
+
+
+### Limitations
+- All the above functions don't support pushdown query
+- All the above functions don't support detailed index answers (even with the switch kylin.query.use-tableindex-answer-non-raw-query = true)
diff --git a/website/docs/query/specification/operators.md b/website/docs/query/specification/operators.md
new file mode 100644
index 0000000000..4d38579a7d
--- /dev/null
+++ b/website/docs/query/specification/operators.md
@@ -0,0 +1,70 @@
+---
+title: Operators
+language: en
+sidebar_label: Operators
+pagination_label: Operators
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - operators
+draft: false
+last_update:
+ date: 08/17/2022
+---
+
+This chapter will introduce operators that applicable to SQL statements.
+
+### Arithmetic Operators
+
+| Operator | Description | Syntax | Example |
+|----------|-------------------|--------|-----------------------|
+| + | Plus operator | A + B | Cost + Profit |
+| - | Minus operator | A - B | Revenue - Cost |
+| * | Multiply operator | A * B | Unit_Price * Quantity |
+| / | Divide operator | A / B | Total_Sale / Quantity |
+
+### Comparison Operators
+
+| Operator | Description | Syntax | Example |
+|----------------------|--------------------------------------------------------------------------------------------------------|---------------------------------------------|------------------------------------------------|
+| \< | Less than | A \< B | col1 \< col2 |
+| \<= | Less than or equal | A \<= B | col1 \<= col2 |
+| \> | Greater than | A \>= B | col1 \> col2 |
+| \>= | Greater than or equal | A \>= B | col1 \>= col2 |
+| \<> | Not Equal | A \<> B | col1 \<> col2 |
+| IS NULL | Whether *value* is null | value IS NULL | col1 IS NULL |
+| IS NOT NULL | Whether *value* is not null | value IS NOT NULL | col1 IS NOT NULL |
+| IS DISTINCT FROM | Whether two values are not equal, treating null values as the same | value1 IS DISTINCT FROM value2 | col1 IS DISTINCT FROM col2 |
+| IS NOT DISTINCT FROM | Whether two values are equal, treating null values as the same | value1 IS NOT DISTINCT FROM value2 | col1 IS NOT DISTINCT FROM col2 |
+| BETWEEN | Return true if the specified value is greater than or equal to value1 and less than or equal to value2 | A BETWEEN value1 AND value2 | col1 BETWEEN '2016-01-01' AND '2016-12-30' |
+| NOT BETWEEN | Whether *value1* is less than *value2* or greater than *value3* | value1 NOT BETWEEN value2 AND value3 | col1 NOT BETWEEN '2016-01-01' AND '2016-12-30' |
+| LIKE | Whether *string1* matches pattern *string2*, *string1* and *string2* are string types | string1 LIKE string2 | col1 LIKE '%frank%' |
+| NOT LIKE | Whether *string1* does not match pattern *string2*, *string1* and *string2* are string types | string1 NOT LIKE string2 [ ESCAPE string3 ] | col1 NOT LIKE '%frank%' |
+| SIMILAR TO | Whether *string1* matches *string2* in regular expression | string1 SIMILAR TO string2 | col1 SIMILAR TO 'frank' |
+| NOT SIMILAR TO | Whether *string1* does not match *string2* in regular expression | string1 NOT SIMILAR TO string2 | col1 NOT SIMILAR TO 'frank' |
+
+
+Limitations
+- The current SIMILAR TO ESCAPE syntax is limited to scenarios that support adding and hitting the model in SQL statements, and other scenarios such as adding computable columns.
+- The string literals including specific symbols need to be escaped by default and the escape character is `\`. For example, to match `\kylin` , it should be using `\\kylin`. For `SIMILAR TO` and `NOT SIMILAR TO` function, the functions use regex match and there is an escaped process. For example, for `\\\\kylin`, the result will be `true` when using `SIMILAR TO` to compare with `\kylin` and `\\kylin`.
+
+### Logical Operators
+
+This section introduces the logical operators supported by Apache Kylin. The values of logical propositions are TRUE, FALSE, and UNKNOWN. The following `boolean` refers to a logical proposition.
+
+| Operator | Description | Syntax | Example |
+|--------------|------------------------------------------------------------------------|-----------------------|-------------------------------|
+| AND | Whether *boolean1* and *boolean2* are both TRUE | boolean1 AND boolean2 | Name ='frank' AND gender='M' |
+| OR | Whether *boolean1* is TRUE or *boolean2* is TRUE | boolean1 OR boolean2 | Name='frank' OR Name='Hentry' |
+| NOT | Whether *boolean* is not TRUE; returns UNKNOWN if *boolean* is UNKNOWN | NOT boolean | NOT (NAME ='frank') |
+| IS FALSE | Whether *boolean* is FALSE; returns FALSE if *boolean* is UNKNOWN | boolean IS FALSE | Name ='frank' IS FALSE |
+| IS NOT FALSE | Whether *boolean* is not FALSE; returns TRUE if *boolean* is UNKNOWN | boolean IS NOT FALSE | Name ='frank' IS NOT FALSE |
+| IS TRUE | Whether *boolean* is TRUE; returns FALSE if *boolean* is UNKNOWN | boolean IS TRUE | Name ='frank' IS TRUE |
+| IS NOT TRUE | Whether *boolean* is not TRUE; returns TRUE if *boolean* is UNKNOWN | boolean IS NOT TRUE | Name ='frank' IS NOT TRUE |
+
+### String Operators
+| Operator | Description | Syntax | Example |
+|----------|---------------------------------------------|----------|---------------------------|
+| \|\| | Concatenates two strings or string columns | A \|\| B | First_name \|\| Last_name |
diff --git a/website/docs/query/insight/sql_spec.md b/website/docs/query/specification/sql_spec.md
similarity index 85%
rename from website/docs/query/insight/sql_spec.md
rename to website/docs/query/specification/sql_spec.md
index 465e40f662..8f4989c81c 100755
--- a/website/docs/query/insight/sql_spec.md
+++ b/website/docs/query/specification/sql_spec.md
@@ -15,10 +15,9 @@ last_update:
---
-kylin supports ANSI SQL 2003, and its basic SQL grammars are listed as follow.
+This chapter provides an in-depth introduction to SQL specification, covering data types and functions applicable to SQL statements. Kylin supports ANSI SQL 2003, ensuring compatibility with industry-standard SQL grammars.
-
-### Supported Syntax
+### Syntax
```sql
statement:
@@ -107,20 +106,18 @@ windowSpec:
]
')'
```
+:::tip Note
+The implementation details may vary across different versions. For any questions or concerns, please reach out to the Kylin Community for assistance.
+:::
-> **Notice:** the versions of the realization may be different. Feel free to contact the Kylin Community if you have any questions.
-
-
+### Keywords
-### SQL Keywords
-
-The following is a list of SQL keywords in kylin. Please avoid using keywords as identifiers as much as possible.
+The following is a list of SQL keywords in Kylin. Please avoid using keywords as identifiers as much as possible.
A, ABS, ABSOLUTE, ACTION, ADA, ADD, ADMIN, AFTER, ALL,ALLOCATE, ALLOW, ALTER, ALWAYS, AND, ANY, APPLY, ARE, ARRAY,ARRAY_MAX_CARDINALITY, AS, ASC, ASENSITIVE, ASSERTION, ASSIGNMENT, ASYMMETRIC, AT, ATOMIC, ATTRIBUTE, ATTRIBUTES,AUTHORIZATION, AVG, BEFORE, BEGIN, BEGIN_FRAME,BEGIN_PARTITION, BERNOULLI, BETWEEN, BIGINT, BINARY, BIT,BLOB, BOOLEAN, BOTH, BREADTH, BY, C, CALL, CALLED,CARDINALITY, CASCADE, CASCADED, CASE, CAST, CATALOG, CATALOG_NAME, CEIL, CEILING, CENTURY, CHAIN, CHAR,CHARACTE [...]
-
### Identifiers
Identifiers are the names of tables, columns and other metadata elements used in an SQL query.
@@ -131,50 +128,55 @@ Quoted identifiers, such as *"Employee Name"*, start and end with double-quotes.
Matching identifiers to the name of the referenced object is case-sensitive. But remember that unquoted identifiers are implicitly converted to upper case before matching, and if the object it refers to was created using an unquoted identifier for its name, then its name will have been converted to the upper case also.
-### Escape Keywords
-
-If your column or table name are using keywords, you will need to use double quote to escape it.
-
-For example, table *DATES* contains column *YEAR* that overlap with kylin's keyword YEAR. As shown in the example below, if you want to query *YEAR* directly, the query will return error as kylin query engine fails to differentiate this column from keywords.
-
-
-
-You can just include the column with double-quotes to get the right result.
-
-
-
-
+### Escaping Keywords
-### Escape Quote
+When a column or table name coincides with a Kylin keyword, you must use double quotes to escape it.
-If your query contains single quote in the value, you can use another single quote to escape single quote in the value.
-
-
-
-For double-quotes in the value, escape is not needed.
-
-
-
-
-
-### Date Query
+For instance, consider a table named `DATES` with a column named `YEAR`, which conflicts with the Kylin keyword `YEAR`. If you attempt to query `YEAR` directly, the query will fail because the Kylin query engine cannot distinguish the column from the keyword.
+```sql
+select YEAR from DATES limit 5;
+```
-The following are syntax examples of date query:
+```text
+Encountered "year from" at line 1, column 8.
+Was expecting one of:
+ "ALL" ...
+ "ARRAY" ...
+ "CASE" ...
+ "CURRENT" ...
+ "CURRENT_CATALOG" ...
+ "CURRENT_DATE" ...
+ "CURRENT_DEFAULT_TRANSFORM_GROUP" ...
+ "CURRENT_PATH" ...
+ "CURRENT_ROLE" ...
+ "CURRENT_SCHEMA" ...
+ "CURRENT_TIME" ...
+```
+To achieve the correct result, enclose the column name in double quotes.
```sql
-select LO_LINENUMBER, LO_ORDERDATE, LO_ORDTOTALPRICE
-from SSB.P_LINEORDER
-where LO_ORDERDATE = date '1992-06-03'
+select "YEAR" from DATES limit 5;
+```
+```text
+|----|
+|YEAR|
+|----|
+|1992|
+|1993|
+|1994|
+|1995|
+|1996|
+|----|
```
-
+### Escaping Quotes
-or
+To ensure the query engine correctly interprets values containing single quotes, use another single quote to escape them. For example:
```sql
-select LO_LINENUMBER, LO_ORDERDATE, LO_ORDTOTALPRICE
-from SSB.P_LINEORDER
-where LO_ORDERDATE = cast ( '1992-06-03' as date)
-```
+-- Escaping single quote, query result is: 'hello world'
+SELECT '''hello world''';
-
+-- There is no need to escape double quote, query result is: "hello world"
+SELECT '"hello world"';
+```
diff --git a/website/docs/query/specification/window_function.md b/website/docs/query/specification/window_function.md
new file mode 100644
index 0000000000..3947bfd13b
--- /dev/null
+++ b/website/docs/query/specification/window_function.md
@@ -0,0 +1,161 @@
+---
+title: Window Functions
+language: en
+sidebar_label: Window Functions
+pagination_label: Window Functions
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - window functions
+draft: false
+last_update:
+ date: 09/13/2024
+---
+Window functions are a powerful tool that can simplify complex queries and improve performance. They allow you to perform calculations on a set of rows that are related to the current row, such as finding the sum or average of values in a specific range.
+
+**Window functions are not supported for defining or recommending computed columns.**
+
+### Syntax Structure
+
+The basic syntax for using a window function is as follows:
+```sql
+function(value) OVER window
+```
+
+#### Window Clause
+A window consists of three clauses:
+
+* `partition by`: a group clause that defines the calculation range of the window function.
+* `order by`: a sort clause that specifies the sorting method within the group after partition.
+* `rows/range`: a window clause that determines a sliding data window within the group.
+ ```sql
+ -- rows is a physical window that selects a fixed number of rows before and after
+ -- the current row number, based on the `order by` clause. The result is independent
+ -- of the current row's value, but rather its sorted row number.
+ sum(columnA) rows between 1 preceding and 2 following;
+ -- Explain: If the current row's `columnA` has a sorted row number of 3, this clause
+ -- selects rows with sequence numbers between 2 and 5.
+
+
+ -- range is a logical window that selects a fixed number of rows before and after
+ -- the current row's value. The result is independent of the sorted row number, but
+ -- rather the row's value.
+ sum(columnA) range between 1 preceding and 2 following;
+ -- Explain: If the current row's `columnA` value is 3, this clause selects rows with
+ -- values between 2 and 5.
+
+ ```
+
+If an **order by** clause is specified without a window clause, the default window clause is equivalent to **range between unbounded preceding and current row**.
+#### Function Part
+
+1. **ROW_NUMBER()**: Returning the position of the current row in its partition, the sequence numbers are not repeated.
+2. **RANK()**: Returning the position of the current row in its partition, possibly with sequence gaps.
+3. **DENSE_RANK()**: Returning the position of the current row in its partition, with no sequence gaps.
+4. **NTILE(value)**: Returning an integer ranging from 1 to value, dividing the partition as equally possible.
+5. **FIRST_VALUE(value)**: Returning value evaluated at the row that is the first row of the window frame.
+6. **LAST_VALUE(value)**: Returning value evaluated at the row that is the last row of the window frame.
+7. **LAG(value, offset, default)**: Returning the forward offset of the current row in the partition. *value* represents the field as the column value, *offset* represents the number that needs to be looked up in the offset row forwards based on the current value, *default* represents the value returned by default when there is no eligible value, and null is returned by default if not filled.
+8. **LEAD(value, offset, default)**: Returning the offset row backwards from the current row in the partition. *value* represents the column as the current value, *offset* represents the number that needs to be searched for the offset row backwards based on the current value, and *default* represents the value returned by default when there is no eligible value, and null is returned by default if not filled.
+
+
+### Examples
+
+The following examples demonstrate the usage of window functions with the *P_LINEORDER* table from the [sample dataset](../../quickstart/tutorial.md). This dataset includes field descriptions for reference.
+
+
+#### Example 1: RANK Functions
+Using **RANK ()**, **DENSE_RANK ()**, and **ROW_NUMBER ()** in a single query to retrieve the first five orders with the least number of items purchased by each buyer. The query is as follows:
+
+ ```sql
+ SELECT *
+ FROM (
+ SELECT
+ ROW_NUMBER() OVER w AS ROW_NUM,
+ RANK() OVER w AS _RANK,
+ DENSE_RANK() OVER w AS D_RANK,
+ LO_ORDERKEY,
+ LO_CUSTKEY,
+ LO_QUANTITY,
+ LO_PARTKEY
+ FROM SSB.P_LINEORDER
+ WINDOW w AS (PARTITION BY LO_CUSTKEY ORDER BY LO_QUANTITY)
+ ) T
+ WHERE ROW_NUM <= 5;
+ ```
+
+
+For a buyer with id '1', the following ranking scenarios are observed:
+
+* **row_number() Function**
+ * Orders with *LO_QUANTITY* = 1 are ranked sequentially: 1, 2, 3, 4
+ * The order with *LO_QUANTITY* = 2 is ranked as 5
+
+* **rank() Function**
+ * Orders with *LO_QUANTITY* = 1 are ranked equally: 1, 1, 1, 1
+ * The order with *LO_QUANTITY* = 2 is ranked as 5, resulting in sequence gaps
+
+* **dense_rank() Function**
+ * Orders with *LO_QUANTITY* = 1 are ranked equally: 1, 1, 1, 1
+ * The order with *LO_QUANTITY* = 2 is ranked as 2, with no sequence gaps
+
+
+#### Example 2: NTILE
+
+The orders of each buyer are divided into 3 groups according to the number of purchased products. In order to display the search results completely, the orders with the number of products greater than or equal to 48 are selected for grouping.
+
+ ```SQL
+ SELECT
+ NTILE(3) OVER w AS N_3,
+ LO_ORDERKEY,
+ LO_CUSTKEY,
+ LO_QUANTITY,
+ LO_PARTKEY
+ FROM SSB.P_LINEORDER
+ WHERE LO_QUANTITY >= 48
+ WINDOW w AS (PARTITION BY LO_CUSTKEY ORDER BY LO_QUANTITY);
+ ```
+
+
+
+#### Example 3: FIRST_VALUE and LAST_VALUE
+Query the first order and the last order with the highest total price sorted by date.
+
+ ```SQL
+ SELECT
+ FIRST_VALUE(TOTAL1) OVER W AS FIRST_VALUE_A,
+ LAST_VALUE(TOTAL1) OVER W AS LAST_VALUE_A,
+ TOTAL1,
+ LO_ORDERDATE
+ FROM (
+ SELECT
+ SUM(LO_ORDTOTALPRICE) AS TOTAL1,
+ LO_ORDERDATE
+ FROM SSB.P_LINEORDER
+ GROUP BY LO_ORDERDATE
+ ) T WINDOW W AS (
+ ORDER BY LO_ORDERDATE ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
+ )
+ ORDER BY LO_ORDERDATE DESC
+ ```
+
+
+
+#### Example 4: LEAD and LAG
+Query the time of last order and next order based on current order.
+
+ ```SQL
+ SELECT
+ LO_ORDERKEY,
+ LO_CUSTKEY,
+ LO_QUANTITY,
+ LO_ORDERDATE,
+ LEAD(LO_ORDERDATE, 1) OVER W AS NEXT_DT,
+ LAG(LO_ORDERDATE, 1) OVER W AS LAST_DT
+ FROM SSB.P_LINEORDER
+ WINDOW W AS (PARTITION BY LO_CUSTKEY ORDER BY LO_ORDERDATE)
+ ```
+
+
diff --git a/website/docs/modeling/model_design/measure_design/count_distinct_case_when_expr.md b/website/docs/query/tuning/count_distinct_expr.md
similarity index 90%
rename from website/docs/modeling/model_design/measure_design/count_distinct_case_when_expr.md
rename to website/docs/query/tuning/count_distinct_expr.md
index 4674e53ac2..93f969ecd6 100644
--- a/website/docs/modeling/model_design/measure_design/count_distinct_case_when_expr.md
+++ b/website/docs/query/tuning/count_distinct_expr.md
@@ -1,18 +1,18 @@
---
-title: Count Distinct Case When Expression
+title: Count-distinct Expression
language: en
-sidebar_label: Count Distinct Case When Expression
-pagination_label: Count Distinct Case When Expression
+sidebar_label: Count-distinct Expression
+pagination_label: Count-distinct Expression
toc_min_heading_level: 2
toc_max_heading_level: 6
pagination_prev: null
pagination_next: null
keywords:
- - count distinct case when expression
+ - count distinct expression
- case when
draft: false
last_update:
- date: 08/19/2022
+ date: 09/13/2024
---
@@ -31,13 +31,13 @@ This function is disable by default, and it can be enabled on the system or proj
To enable it on the system level, configure the parameters in `$KYLIN_HOME/conf/kylin.properties` . To enable it on project level, add the configuration in **Setting-Advanced Settings-Custom Project Configuration**.
-```
+```sql
kylin.query.convert-count-distinct-expression-enabled=true
```
2. Supported Count Distinct Case When Expression syntax
-```
+```sql
count(distinct case when {condition} then {column} else null end)
```
@@ -49,13 +49,11 @@ b. The `{column}` must be set to the `count (distinct column)` measure.
c.When selecting the error option in the function parameter, the return type must be selected: precisely, otherwise the optimization of this syntax cannot be triggered
-
-
After the function is enabled, queries that conform to the above grammar can be answered by indexes that include **dimension column** and `count(distinct column)`**measure** in the `condition` expression.
Example:
-```
+```sql
count(distinct (case when cal_dt = date'2012-01-01' then price else null end))
```
diff --git a/website/docs/query/optimization/segment_pruning.md b/website/docs/query/tuning/data_skipping.md
similarity index 78%
rename from website/docs/query/optimization/segment_pruning.md
rename to website/docs/query/tuning/data_skipping.md
index bac9e7d87f..967cef302e 100644
--- a/website/docs/query/optimization/segment_pruning.md
+++ b/website/docs/query/tuning/data_skipping.md
@@ -1,8 +1,8 @@
---
-title: Segment Pruning When Querying
+title: Data Skipping
language: en
-sidebar_label: Segment Pruning When Querying
-pagination_label: Segment Pruning When Querying
+sidebar_label: Data Skipping
+pagination_label: Data Skipping
toc_min_heading_level: 2
toc_max_heading_level: 6
pagination_prev: null
@@ -11,7 +11,7 @@ keywords:
- segment pruning
draft: false
last_update:
- date: 08/17/2022
+ date: 09/13/2024
---
Starting from Kylin 5.0, we support the calculation of the dimension value range (maximum and minimum) of all dimensions when building the Segment, so we can prune segment during queries, reducing the scanning range of the segment to optimize some query performance.
@@ -19,7 +19,7 @@ Starting from Kylin 5.0, we support the calculation of the dimension value range
### Configuration
-This optimization is enable by default. Under normal circumstances, you do not need to pay attention to this optimization. In some extreme cases, system-level or project-level shutdown is supported.
+This optimization is enabled by default. Under normal circumstances, you do not need to pay attention to this optimization. In some extreme cases, system-level or project-level shutdown is supported.
To disable it on the system level, configure the parameters in `$KYLIN_HOME/conf/kylin.properties` . To disable it on project level, add the configuration in **Setting -> Advanced Settings -> Custom Project Configuration**.
diff --git a/website/docs/query/insight/operator_function/model_priority.md b/website/docs/query/tuning/model_priority.md
similarity index 56%
rename from website/docs/query/insight/operator_function/model_priority.md
rename to website/docs/query/tuning/model_priority.md
index 32a3a9a8e2..ecdde4d6a3 100644
--- a/website/docs/query/insight/operator_function/model_priority.md
+++ b/website/docs/query/tuning/model_priority.md
@@ -1,40 +1,41 @@
---
-title: Specify Model Priorities in SQL
+title: Query Specific Model
language: en
-sidebar_label: Specify Model Priorities in SQL
-pagination_label: Specify Model Priorities in SQL
+sidebar_label: Query Specific Model
+pagination_label: Query Specific Model
toc_min_heading_level: 2
toc_max_heading_level: 6
pagination_prev: null
pagination_next: null
keywords:
- - model priorities
+ - model priority
draft: false
last_update:
date: 08/17/2022
---
+Query Hint is an advanced feature that enables users to specify **model priority**. When multiple models can answer a query, Kylin automatically selects the best one. However, users can override this default behavior by using a model priority hint in their SQL queries, allowing them to choose specific models for specific queries.
-When there are more than on model that can answer a query, kylin will automatically choose a best model. But in some cases, a user would like to use some certain models for some certain queries. And the user can achieve that via a model priority hint in the SQL.
+### Hint Syntax
-
-### Model Priority Hint
-The syntax
-```
-SELECT /*+ MODEL_PRIORITY(model1, model2) */ col1, col2 from ....
+``` sql
+SELECT /*+ MODEL_PRIORITY(model1, model2) */ col1, col2
+from table;
```
The hint starts with `/*+` and ends with `*/`. And the hint must be placed right after the `SELECT` clause.
`MODEL_PRIORITY(model1, model2, ...)` specifies the model priorities, `MODEL_PRIORITY(...)` accept a list of model names with descending priority. The model that doesn't appear in the hint will be assigned with the lowest priority.
-The model priority hint will be valid for the entire query. Only the first hint occured in the SQL will be valid.
+The model priority hint will be valid for the entire query. Only the first hint occurred in the SQL will be valid.
During the model matching, if multiple model is capable to answer the query. kylin will use the model with the highest priority specified in the model priority hint
Supported starts from kylin 5.0
-#### Example
-```
-SELECT /*+ MODEL_PRIORITY(model1, model2) */ col1, col2 from table;
+### Example
+
+```sql
+SELECT /*+ MODEL_PRIORITY(model1, model2) */ col1, col2
+from table;
```
If both model1 and model2 is capable to answer the query, model1 will be the chosen for this query.
diff --git a/website/docs/query/tuning/partial_match_join.md b/website/docs/query/tuning/partial_match_join.md
new file mode 100644
index 0000000000..bdacb50384
--- /dev/null
+++ b/website/docs/query/tuning/partial_match_join.md
@@ -0,0 +1,16 @@
+---
+title: Partial Match Join
+language: en
+sidebar_label: Partial Match Join
+pagination_label: Partial Match Join
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - segment pruning
+draft: false
+last_update:
+ date: 09/13/2024
+---
+
diff --git a/website/docs/query/optimization/query_enhanced.md b/website/docs/query/tuning/query_enhanced.md
similarity index 89%
rename from website/docs/query/optimization/query_enhanced.md
rename to website/docs/query/tuning/query_enhanced.md
index d974262e19..b05720f1ae 100644
--- a/website/docs/query/optimization/query_enhanced.md
+++ b/website/docs/query/tuning/query_enhanced.md
@@ -1,8 +1,8 @@
---
-title: Use the Left Join model to answer Inner Join queries with equivalent semantics
+title: Equivalent Semantics Query
language: en
-sidebar_label: Use the Left Join model to answer Inner Join queries with equivalent semantics
-pagination_label: Use the Left Join model to answer Inner Join queries with equivalent semantics
+sidebar_label: Equivalent Semantics Query
+pagination_label: Equivalent Semantics Query
toc_min_heading_level: 2
toc_max_heading_level: 6
pagination_prev: null
@@ -14,7 +14,7 @@ last_update:
date: 08/17/2022
---
-By default in Kylin, the relationship between tables in the query SQL must be consistent with the relationship between the fact tables and dimension tables defined in the model, that is, the model of `Left Join` cannot answer the query of `Inner Join`.
+By default, in Kylin, the relationship between tables in the query SQL must be consistent with the relationship between the fact tables and dimension tables defined in the model, that is, the model of `Left Join` cannot answer the query of `Inner Join`.
But in some cases, part of `Left Join` queries can be semantically equivalently transformed into `Inner Join` queries, so we provide configuration parameters that allow users to use `Left Join` model to answer equivalent semantics `Inner Join` query.
diff --git a/website/docs/modeling/model_design/measure_design/sum_expression.md b/website/docs/query/tuning/sum_expression.md
similarity index 89%
rename from website/docs/modeling/model_design/measure_design/sum_expression.md
rename to website/docs/query/tuning/sum_expression.md
index f0c791977b..60c4488b82 100644
--- a/website/docs/modeling/model_design/measure_design/sum_expression.md
+++ b/website/docs/query/tuning/sum_expression.md
@@ -8,10 +8,10 @@ toc_max_heading_level: 6
pagination_prev: null
pagination_next: null
keywords:
- - sum expression
+ - sum expression
draft: false
last_update:
- date: 08/19/2022
+ date: 09/13/2024
---
@@ -34,7 +34,7 @@ Currently, four kinds of sum (expression) usages are supported, namely
- sum(constant)
- sum(cast(case when))
-We will use the sample dataset to introduce the usage. Read more about the [Sample Dataset](../../../quickstart/tutorial.md).
+We will use the sample dataset to introduce the usage. Read more about the [Sample Dataset](../../quickstart/tutorial.md).
@@ -44,7 +44,7 @@ For example:
```sql
select
- sum(case when LO_ORDERPRIOTITY='1-URGENT' then LO_ORDTOTALPRICE else null end)
+ sum(case when LO_ORDERPRIOTITY='1-URGENT' then LO_ORDTOTALPRICE else null end)
from SSB.LO_LINEORDER
```
@@ -88,7 +88,9 @@ In order to run this SQL, just enable the sum(expression) feature. No other sett
For example:
```sql
-select sum(cast((case when LO_ORDERPRIOTITY='1-URGENT' then LO_ORDTOTALPRICE else null end) as bigint)) from SSB.P_LINEORDER
+select
+ sum(cast((case when LO_ORDERPRIOTITY='1-URGENT' then LO_ORDTOTALPRICE else null end) as bigint))
+from SSB.P_LINEORDER
```
In order to run this SQL, set your model as below in addition to enable sum(expression):
diff --git a/website/docs/query/tuning/transformations.md b/website/docs/query/tuning/transformations.md
new file mode 100644
index 0000000000..4770adca4b
--- /dev/null
+++ b/website/docs/query/tuning/transformations.md
@@ -0,0 +1,16 @@
+---
+title: SQL Transformations
+language: en
+sidebar_label: SQL Transformations
+pagination_label: SQL Transformations
+toc_min_heading_level: 2
+toc_max_heading_level: 6
+pagination_prev: null
+pagination_next: null
+keywords:
+ - execution principle
+draft: false
+last_update:
+ date: 09/13/2024
+---
+
diff --git a/website/docs/quickstart/intro.md b/website/docs/quickstart/intro.md
index 8643ea2f42..e8fac38348 100644
--- a/website/docs/quickstart/intro.md
+++ b/website/docs/quickstart/intro.md
@@ -290,5 +290,5 @@ server.port=7070
**Q: Is the query pushdown engine turned on by default?**
-Yes, if you want to turn it off, please refer to [Pushdown to SparkSQL](../query/pushdown/pushdown_to_embedded_spark.md).
+Yes, if you want to turn it off, please refer to [Pushdown to SparkSQL](../query/push_down.md).
diff --git a/website/docs/quickstart/tutorial.md b/website/docs/quickstart/tutorial.md
index 5c333ae5b4..18cfecb679 100644
--- a/website/docs/quickstart/tutorial.md
+++ b/website/docs/quickstart/tutorial.md
@@ -155,9 +155,9 @@ You can submit a query to analyze your business data and experience the sub-seco
Kylin supports standard SQL queries. After you add a data source table, the query is already pushed down to the Hive data source. You can immediately query the data; however, we do not recommend doing so at this time. Doing so immediately, especially when the data volume is high or the query is complex, can cause the query execution to take a long time.
- Once you have the model and index created and have data loaded in the model, new queries can then hit the model and the pre-calculated data saved in the model will be used to answer queries. This accelerated query execution method can be 10x to 100x faster. You can read the [Query Analysis](../query/insight/intro.md) section for a detailed explanation of SQL statements.
+ Once you have the model and index created and have data loaded in the model, new queries can then hit the model and the pre-calculated data saved in the model will be used to answer queries. This accelerated query execution method can be 10x to 100x faster. You can read the [Query Analysis](../query/principles/precalculation.md) section for a detailed explanation of SQL statements.
- Your history query will be saved in the **Query -> History** page, you can view the [Query History](../query/history.md) section for more information.
+ Your history query will be saved in the **Query -> History** page, you can view the [Query History](../query/web_ui/query_history.md) section for more information.
2. **Query Analysis Example**
diff --git a/website/sidebars.ts b/website/sidebars.ts
index 9b2b478a7d..7f54bcfee8 100644
--- a/website/sidebars.ts
+++ b/website/sidebars.ts
@@ -140,7 +140,7 @@ const sidebars = {
items: [
{
type: 'doc',
- id: 'configuration/configuration'
+ id: 'configuration/config'
},
{
@@ -319,14 +319,6 @@ const sidebars = {
type: 'doc',
id: 'modeling/model_design/measure_design/collect_set'
},
- {
- type: 'doc',
- id: 'modeling/model_design/measure_design/sum_expression'
- },
- {
- type: 'doc',
- id: 'modeling/model_design/measure_design/count_distinct_case_when_expr'
- },
],
},
{
@@ -443,165 +435,96 @@ const sidebars = {
label: 'Query',
link: {
type: 'doc',
- id: 'query/intro'
+ id: 'query/insight'
},
items: [
- {
- type: 'doc',
- id: 'query/data_type'
- },
{
type: 'category',
- label: 'Basic Query Execution',
+ label: 'SQL Specification',
link: {
type: 'doc',
- id: 'query/insight/intro'
+ id: 'query/specification/sql_spec'
},
items: [
{
type: 'doc',
- id: 'query/insight/insight'
+ id: 'query/specification/data_type'
},
{
type: 'doc',
- id: 'query/insight/sql_spec'
+ id: 'query/specification/operators'
},
{
type: 'doc',
- id: 'query/insight/async_query'
+ id: 'query/specification/functions'
+
},
{
type: 'category',
- label: 'Operators and Functions',
- link: {
- type: 'doc',
- id: 'query/insight/operator_function/intro'
- },
+ label: 'Advanced Functions',
items: [
{
type: 'doc',
- id: 'query/insight/operator_function/model_priority'
+ id: 'query/specification/window_function',
},
{
- type: 'category',
- label: 'Operators',
- link: {
- type: 'doc',
- id: 'query/insight/operator_function/operator/intro',
- },
- items: [
- {
- type: 'doc',
- id: 'query/insight/operator_function/operator/arithmetic_operator',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/operator/comparison_operator',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/operator/logical_operator',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/operator/string_operator',
- },
- ],
+ type: 'doc',
+ id: 'query/specification/grouping_function',
},
{
- type: 'category',
- label: 'Function',
- link: {
- type: 'doc',
- id: 'query/insight/operator_function/function/intro',
- },
- items: [
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/aggregate_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/arithmetic_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/bitmap_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/conditional_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/datetime_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/grouping_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/intersect_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/miscellaneous_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/string_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/type_function',
- },
- {
- type: 'doc',
- id: 'query/insight/operator_function/function/window_function',
- },
- ],
- }
- ],
+ type: 'doc',
+ id: 'query/specification/bitmap_function',
+ },
+ {
+ type: 'doc',
+ id: 'query/specification/intersect_function',
+ },
+ ]
},
- ],
- },
- {
- type: 'doc',
- id: 'query/history'
+ ]
},
{
type: 'category',
- label: 'Query Optimization',
- link: {
- type: 'doc',
- id: 'query/optimization/intro'
- },
+ label: 'Query Tuning',
items: [
{
type: 'doc',
- id: 'query/optimization/query_enhanced'
+ id: 'query/tuning/data_skipping'
},
{
type: 'doc',
- id: 'query/optimization/segment_pruning'
+ id: 'query/tuning/model_priority'
},
- ],
- },
- {
- type: 'category',
- label: 'Query PushDown',
- link: {
- type: 'doc',
- id: 'query/pushdown/intro'
- },
- items: [
+ /*{
+ type: 'doc',
+ id: 'query/tuning/partial_match_join'
+ },*/
{
type: 'doc',
- id: 'query/pushdown/pushdown_to_embedded_spark'
+ id: 'query/tuning/sum_expression'
+ },
+ {
+ type: 'doc',
+ id: 'query/tuning/count_distinct_expr'
+ },
+ {
+ type: 'doc',
+ id: 'query/tuning/query_enhanced'
},
],
},
+ {
+ type: 'doc',
+ id: 'query/push_down'
+ },
+ {
+ type: 'doc',
+ id: 'query/query_history'
+ },
+ {
+ type: 'doc',
+ id: 'query/async_query'
+ },
],
},
{
@@ -1036,4 +959,4 @@ const sidebars = {
],
};
-module.exports = sidebars;
+export default sidebars;