Project: StarRocks (App Definition and Development / Database)
File: release-3.0.md

displayed_sidebar: "English" Release date: January 2, 2024 Added the function. Added a new metric `maxtabletrowset_num` for setting the maximum allowed number of rowsets. This metric helps detect possible compaction issues and thus reduces the occurrences of the error "too many versions". A new value option `GROUPCONCATLEGACY` is added to the session variable to provide compatibility with the implementation logic of the function in versions earlier than v2.5. When using JDK, the default GC algorithm is G1. The `betablets` view in the `informationschema` database provides a new field `INDEX_DISK`, which records the disk usage (measured in bytes) of persistent indexes Queries on MySQL external tables and the external tables within JDBC catalogs support including keywords in the WHERE clause. Supports updates onto the specified partitions of an automatically partitioned table. If the specified partitions do not exist, an error is returned. The Primary Key table size returned by the statement includes the sizes of .cols files (these are files related to partial column updates and generated columns) and persistent index files. Optimized the performance of persistent index update when compaction is performed on all rowsets of a Primary Key table, which reduces disk read I/O. When the string on the right side of the LIKE operator within the WHERE clause does not include `%` or `_`, the LIKE operator is converted into the `=` operator. Optimized the logic used to compute compaction scores for Primary Key tables, thereby aligning the compaction scores for Primary Key tables within a more consistent range with the other three table types. The result returned by the statement now includes the timestamps of consumption messages from each partition. Optimized the performance of some Bitmap-related operations, including: Optimized nested loop joins. Optimized the `bitmap_xor` function. Supports Copy on Write to optimize Bitmap performance and reduce memory consumption. Added the session variable `enablematerializedviewforinsert`, which controls whether materialized views rewrite the queries in INSERT INTO SELECT statements. The default value is `false`. Changed the FE configuration item `enablenewpublish_mechanism` to a static parameter from a dynamic one. You must restart the FE after you modify the parameter settings. Changed the default retention period of trash files to 1 day from the original 3 days. Added session variable `cbodecimalcaststringstrict`, which controls how the CBO converts data from the DECIMAL type to the STRING type. If this variable is set to `true`, the logic built in v2.5.x and later versions prevails and the system implements strict conversion (namely, the system truncates the generated string and fills 0s based on the scale length). If this variable is set to `false`, the logic built in versions earlier than v2.5.x prevails and the system processes all valid digits to generate a string. The default value is `true`. Added session variables `transactionreadonly` and `txreadonly` to specify the transaction access mode, which are compatible with MySQL versions 5.7.20 and above. Added the FE configuration item `routineloadunstablethresholdsecond`. Added the FE configuration item `httpworkerthreads_num`, which specifies the number of threads for HTTP server to deal with HTTP requests. The default value is `0`. If the value for this parameter is set to a negative value or 0, the actual thread number is twice the number of CPU

Added the FE configuration item `defaultmvrefresh_immediate`, which specifies whether to immediately refresh the materialized view after the materialized view is created. The default value is `true`. Added the BE configuration item `enablestreamloadverboselog`. The default value is `false`. With this parameter set to `true`, StarRocks can record the HTTP requests and responses for Stream Load jobs, making troubleshooting easier. Added the BE configuration item `pindexmajorcompactionlimitper_disk` to configure the maximum concurrency of compaction on a disk. This addresses the issue of uneven I/O across disks due to compaction. This issue can cause excessively high I/O for certain disks. The default value is `1`. Added BE configuration items to specify the timeout duration for connecting to object storage: `objectstorageconnecttimeoutms`: Timeout duration to establish socket connections with object storage. The default value is `-1`, which means to use the default timeout duration of the SDK configurations. `objectstoragerequesttimeoutms`: Timeout duration to establish HTTP connections with object storage. The default value is `-1`, which means to use the default timeout duration of the SDK configurations. Fixed the following issues: In some cases, BEs may crash when a Catalog is used to read ORC external tables. The BEs crash if users create persistent indexes in the event of data corruption. BEs occasionally crash after a Bitmap index is added. Failures in replaying replica operations may cause FEs to crash. Setting the FE parameter `recoverwithempty_tablet` to `true` may cause FEs to crash. Queries fail during hash joins, causing BEs to crash. In a StarRocks shared-nothing cluster, queries against Iceberg or Hive tables may cause BEs to crash. The error "getappliedrowsets failed, tablet updates is in error state: tablet:18849 actual row size changed after compaction" is returned for queries. Running `show proc '/statistic'` may cause a deadlock. The FE performance plunges after the FE configuration item `enablecollectquerydetailinfo` is set to `true`. Errors may be thrown if large amounts of data are loaded into a Primary Key table with persistent index enabled. After StarRocks is upgraded from v2.4 or earlier to a later version, compaction scores may rise unexpectedly. If `INFORMATIONSCHEMA` is queried by using the database driver MariaDB ODBC, the `CATALOGNAME` column returned in the `schemata` view holds only `null` values. FEs crash due to the abnormal data loaded and cannot restart. If schema changes are being executed while a Stream Load job is in the PREPARED state, a portion of the source data to be loaded by the job is lost. Including two or more slashes (`/`) at the end of the HDFS storage path causes the backup and restore of the data from HDFS to fail. The `partitionlivenumber` property added by using the ALTER TABLE statement does not take effect. The function occasionally causes the BEs to crash. Deadlocks may occur when users refresh materialized views. Global Runtime Filter may cause BEs to crash in certain scenarios. In some cases, `bitmaptostring` may return incorrect result due to data type overflow. Release date: November 17, 2023 The `COLUMNS` view in the system database `INFORMATION_SCHEMA` can display ARRAY, MAP, and STRUCT columns. Fixed the following issues: When `show proc '/current_queries';` is being executed and meanwhile a query begins to be executed, BEs may crash. When data is continuously loaded into a Primary Key table with a sort key specified at a high frequency, compaction failures may

If a filtering condition is specified in a Broker Load job, BEs may crash during the data loading in certain circumstances. An unknown error is reported when SHOW GRANTS is executed. BE may crash for specific data types if the target data type specified in the `cast()` function is the same as the original data type. `DATATYPE` and `COLUMNTYPE` for BINARY or VARBINARY data types are displayed as `unknown` in the `information_schema.columns` view. Long-time, frequent data loading into a Primary Key table with persistent index enabled may cause BEs to crash. The query result is incorrect when Query Cache is enabled. After a cluster is restarted, the data in a restored table may be inconsistent with the data in that table before being backed up. If RESTORE is executed and meanwhile Compaction takes place, it may cause BEs to crash. Release date: October 18, 2023 Window functions COVARSAMP, COVARPOP, CORR, VARIANCE, VARSAMP, STD, and STDDEVSAMP now support the ORDER BY clause and Window clause. The Publish phase of a load job that writes data into a Primary Key table is changed from asynchronous mode to synchronous mode. As such, the data loaded can be queried immediately after the load job finishes. An error instead of NULL is returned if a decimal overflow occurs during queries on the DECIMAL type data. Executing SQL commands with invalid comments now returns results consistent with MySQL. For a StarRocks table that uses RANGE partitioning with only one partitioning column or expression partitioning, SQL predicates containing partition column expressions can also be used for partition pruning. Fixed the following issues: Concurrently creating and deleting databases and tables can, in certain cases, result in the table not being found and further leads to the failure of data loading into that table. Using UDFs may lead to memory leaks in certain cases. If the ORDER BY clause contains aggregate functions, an error "java.lang.IllegalStateException: null" is returned. If users run queries against data stored in Tencent COS by using their Hive catalog which consists of multiple levels, the query results will be incorrect. If some subcfields of the STRUCT in ARRAY&lt;STRUCT&gt; type data are missing, the data length is incorrect when default values are filled in the missing subcfields during queries, which causes BEs to crash. The version of Berkeley DB Java Edition is upgraded to avoid security vulnerabilities. If users load data into a Primary Key table on which truncate operations and queries are concurrently performed, an error "java.lang.NullPointerException" is thrown in certain cases. If the Schema Change execution time is too long, it may fail because the tablet of the specified version is garbage-collected. If users use CloudCanal to load data into table columns that are set to `NOT NULL` but have no default value specified, an error "Unsupported dataFormat value is : \N" is thrown. In StarRocks shared-data clusters, the information of table keys is not recorded in `information_schema.COLUMNS`. As a result, DELETE operations cannot be performed when data is loaded by using Flink Connector. During the upgrade, if the types of certain columns are also upgraded (for example, from Decimal type to Decimal v3 type), compaction on certain tables with specific characteristics may cause BEs to

When data is loaded by using Flink Connector, the load job is suspended unexpectedly if there are highly concurrent load jobs and both the number of HTTP threads and the number of Scan threads have reached their upper limits. BEs crash when libcurl is invoked. An error occurs when a column of BITMAP type is added to a Primary Key table. Release date: September 12, 2023 When using the function, you must use the SEPARATOR keyword to declare the separator. The aggregate function supports the DISTINCT keyword and the ORDER BY clause. Data in partitions can be automatically cooled down over time. (This feature is not supported for .) Supports implicit conversions for all compound predicates and for all expressions in the WHERE clause. You can enable or disable implicit conversions by using the `enablestricttype`. The default value of this session variable is `false`. Unifies the logic between FEs and BEs in converting strings to integers. If `enableorclate_materialization` is set to `true`, an unexpected result is returned when a Hive catalog is used to query STRUCT-type data in ORC files. During data queries through Hive Catalog, if a partitioning column and an OR operator are specified in the WHERE clause, the query result is incorrect. The values returned by the RESTful API action `show_data` for cloud-native tables are incorrect. If the stores data in Azure Blob Storage and a table is created, the FE fails to start after the cluster is rolled back to version 3.0. A user has no permission when querying a table in the Iceberg catalog even if the user is granted permission on that table. The `Default` field values returned by the statement for columns of the or data type are incorrect. Modifying the FE dynamic parameter `maxbrokerloadjobconcurrency` using the `ADMIN SET FRONTEND CONFIG` command does not take effect. The FE may fail to start when a materialized view is being refreshed while its refresh strategy is being modified. The error `unknown error` is returned when `select count(distinct(int+double)) from table_name` is executed. After a Primary Key table is restored, metadata errors occur and cause metadata inconsistencies occur if a BE is restarted. Release date: August 16, 2023 Supports aggregate functions , , and . Supports the following : COVARSAMP, COVARPOP, CORR, VARIANCE, VARSAMP, STD, and STDDEVSAMP. Added more prompts in the error message `xxx too many versions xxx`. Dynamic partitioning further supports the partitioning unit to be year. The partitioning field is case-insensitive when expression partitioning is used at table creation and . Fixed the following issues: Incorrect table-level scan statistics in FE cause inaccurate metrics for table queries and loading. The query result is not stable if the sort key is modified for a partitioned table. The version number for a tablet is inconsistent between the BE and FE after data is restored. If the bucket number is not specified when users create a Colocation table, the number will be inferred as 0, which causes failures in adding new partitions. When the SELECT result set of INSERT INTO SELECT is empty, the load job status returned by SHOW LOAD is `CANCELED`. BEs may crash when the input values of the sub_bitmap function are not of the BITMAP type. BEs may crash when the AUTO_INCREMENT column is being updated. Outer join and Anti join rewrite errors for materialized

Inaccurate estimation of average row size causes Primary Key partial updates to occupy excessively large memory. Activating an inactive materialized view may cause a FE to crash. Queries can not be rewritten to materialized views created based on external tables in a Hudi catalog. The data of a Hive table can still be queried even after the table is dropped and the metadata cache is manually updated. Manually refreshing an asynchronous materialized view via a synchronous call results in multiple INSERT OVERWRITE records in the `informationschema.taskruns` table. FE memory leak caused by blocked LabelCleaner threads. Release date: July 18, 2023 Queries can be rewritten even when the queries contain a different type of join than the materialized view. Optimized the manual refreshing of asynchronous materialized views. Supports using the REFRESH MATERIALIZED VIEW WITH SYNC MODE syntax to synchronously invoke materialized view refresh tasks. If the queried fields are not included in the output columns of a materialized view but are included in the predicate of the materialized view, the query can still be rewritten to benefit from the materialized view. , table aliases are not case-sensitive. Added a new field `tableid` to the table `Informationschema.tablesconfig`. You can join the table `tablesconfig` with the table `betablets` on the column `tableid` in the database `Information_schema` to query the names of the database and table to which a tablet belongs. Fixed the following issues: If a query that contains the sum aggregate function is rewritten to directly obtain query results from a single-table materialized view, the values in sum() field may be incorrect due to type inference issues. An error occurs when SHOW PROC is used to view information about tablets in a StarRocks shared-data cluster. The INSERT operation hangs when the length of CHAR data in a STRUCT to be inserted exceeds the maximum length. Some data rows queried fail to be returned for INSERT INTO SELECT with FULL JOIN. An error `ERROR xxx: Unknown table property xxx` occurs when the ALTER TABLE statement is used to modify the table's property `default.storage_medium`. An error occurs when Broker Load is used to load empty files. Decommissioning a BE sometimes hangs. Release date: June 28, 2023 Metadata synchronization of StarRocks external tables has been changed to occur during data loading. Users can specify partitions when they run INSERT OVERWRITE on tables whose partitions are automatically created. For more information, see . Optimized the error message reported when partitions are added to a non-partitioned table. Fixed the following issues: The min/max filter gets the wrong Parquet field when the Parquet file contains complex data types. Load tasks are still queuing even when the related database or table has been dropped. There is a low probability that an FE restart may cause BEs to crash. Load and query jobs occasionally freeze when the variable `enable_profile` is set to `true`. Inaccurate error message is displayed when INSERT OVERWRITE is executed on a cluster with less than three alive BEs. Release date: June 13, 2023 Predicates in a UNION query can be pushed down after the query is rewritten by an asynchronous materialized view. Optimized the for tables. Removed the dependency of NetworkTime on system clocks, which fixes incorrect NetworkTime caused by inconsistent system clocks across

Fixed the following issues: A schema change sometimes may be hung if data loading occurs simultaneously with the schema change. Queries encounter an error when the session variable `pipelineprofilelevel` is set to `0`. CREATE TABLE encounters an error when `cloudnativestorage_type` is set to `S3`. LDAP authentication succeeds even when no password is used. CANCEL LOAD fails if the table involved in the load job does not exist. If your system has a database named `starrocks`, change it to another name using ALTER DATABASE RENAME before the upgrade. This is because `starrocks` is the name of a default system database that stores privilege information. Release date: June 1, 2023 . supports loading Avro data. Supports (including Azure Blob Storage and Azure Data Lake Storage). Shared-data clusters support using StarRocks external tables to synchronize data with another StarRocks cluster. Added `loadtrackinglogs` to to record recent loading errors. Ignores special characters in CREATE TABLE statements. Fixed the following issues: Information returned by SHOW CREATE TABLE is incorrect for Primary Key tables. BEs may crash during a Routine Load job. Null pointer exception (NPE) occurs if you specify unsupported properties when creating a partitioned table. Information returned by SHOW TABLE STATUS is incomplete. If your system has a database named `starrocks`, change it to another name using ALTER DATABASE RENAME before the upgrade. This is because `starrocks` is the name of a default system database that stores privilege information. Release date: April 28, 2023 Decouple storage and compute. StarRocks now supports data persistence into S3-compatible object storage, enhancing resource isolation, reducing storage costs, and making compute resources more scalable. Local disks are used as hot data cache for boosting query performance. The query performance of the new shared-data architecture is comparable to the classic architecture (shared-nothing) when local disk cache is hit. For more information, see . The attribute is supported to provide globally unique IDs, which simplifies data management. are supported, which makes partition creation easier to use and more flexible. Primary Key tables support more complete and syntax, including the use of CTEs and references to multiple tables. Added Load Profile for Broker Load and INSERT INTO jobs. You can view the details of a load job by querying the load profile. The usage is the same as . `sql_dialect`. . Supports using to manually switch between catalogs in the current session. Provides a new privilege system with full RBAC functionalities, supporting role inheritance and default roles. For more information, see . Provides more privilege management objects and more fine-grained privileges. For more information, see . <!-- - [Preview] Supports operator spilling for large queries, which can use disk space to ensure stable running of queries in case of insufficient memory. --> Allows more queries on joined tables to benefit from the . For example, the query cache now supports Broadcast Join and Bucket Shuffle Join. Supports . Dynamic adaptive parallelism: StarRocks can automatically adjust the `pipeline_dop` parameter for query concurrency. Added the following privilege-related SQL statements: , , , and . Added the following semi-structured data analysis functions: , . supports ORDER BY. Window functions and support IGNORE NULLS. Added string functions , , and . Added encryption functions and . Added math functions , , and . Added utility function . Updated Docker image and the related for version 3.0. Supports more CSV parameters for data ingestion, including SKIPHEADER, TRIMSPACE, ENCLOSE, and

See , , and . The primary key and sort key are decoupled in . The sort key can be separately specified in `ORDER BY` when you create a table. Optimized the memory usage of data ingestion into Primary Key tables in scenarios such as large-volume ingestion, partial updates, and persistent primary indexes. Supports creating asynchronous INSERT tasks. For more information, see and . Optimized the rewriting capabilities of , including: Supports rewrite of View Delta Join, Outer Join, and Cross Join. Optimized SQL rewrite of Union with partition. Improved materialized view building capabilities: supporting CTE, select *, and Union. Optimized the information returned by . Supports adding MV partitions in batches, which improves the efficiency of partition addition during materialized view building. All operators are supported in the pipeline engine. Non-pipeline code will be removed in later versions. Improved and added big query log. supports viewing CPU and memory information. Optimized Outer Join Reorder. Optimized error messages in the SQL parsing stage, providing more accurate error positioning and clearer error messages. Optimized metadata statistics collection. Supports using to view the creation statements of the tables that are managed by an external catalog and are stored in Apache Hive, Apache Iceberg, Apache Hudi, or Delta Lake. Some URLs in the license header of StarRocks' source file cannot be accessed. An unknown error is returned during SELECT queries. Supports SHOW/SET CHARACTER. When the loaded data exceeds the field length supported by StarRocks, the error message returned is not correct. Supports `show full fields from 'table'`. Partition pruning causes MV rewrites to fail. MV rewrite fails when the CREATE MATERIALIZED VIEW statement contains `count(distinct)` and `count(distinct)` is applied to the DISTRIBUTED BY column. FEs fail to start when a VARCHAR column is used as the partitioning column of a materialized view. Window functions and incorrectly handle IGNORE NULLS. Adding temporary partitions conflicts with automatic partition creation. The new role-based access control (RBAC) system supports the previous privileges and roles. However, the syntax of related statements such as and is changed. Renamed SHOW MATERIALIZED VIEW as . Added the following : AUTOINCREMENT, CURRENTROLE, DEFERRED, ENCLOSE, ESCAPE, IMMEDIATE, PRIVILEGES, SKIPHEADER, TRIMSPACE, VARBINARY. You can upgrade from v2.5 to v3.0 or downgrade from v3.0 to v2.5. In theory, an upgrade from a version earlier than v2.5 is also supported. To ensure system availability, we recommend that you first upgrade your cluster to v2.5 and then to v3.0. Take note of the following points when you perform a downgrade from v3.0 to v2.5. StarRocks upgrades the BDB library in v3.0. However, BDBJE cannot be rolled back. You must use BDB library of v3.0 after a downgrade. Perform the following steps: After you replace the FE package with a v2.5 package, copy `fe/lib/starrocks-bdb-je-18.3.13.jar` of v3.0 to the `fe/lib` directory of v2.5. Delete `fe/lib/je-7.*.jar`. The new RBAC privilege system is used by default after you upgrade to v3.0. You can only downgrade to v2.5. After a downgrade, run to create a new image and wait for the new image to be synchronized to all follower FEs. If you do not run this command, some of the downgrade operations may fail. This command is supported from 2.5.3 and later. For details about the differences between the privilege system of v2.5 and v3.0, see "Upgrade notes" in .