Tsurugi 1.12.0 - Release Notes (en) #243
akirakw
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1.12.0 Release Notes
Overview
Tsurugi 1.12.0 adds support for the
TRUNCATE TABLEstatement, which deletes all rows in a table, as a new SQL feature.TRUNCATE TABLEcan delete all rows of a table quickly even when the table holds a large amount of data, which makes it suitable for use cases such as emptying a work table used for temporary bulk data, or replacing a validation dataset to repeat trials.A
DELETEstatement without a condition performs the same operation, but its processing time grows with the amount of data, so you can choose between the two depending on your purpose.TRUNCATE TABLEkeeps the table definition and indexes as they are, so it does not require the index re-creation that is needed when a table is initialized by combiningDROP TABLEandCREATE TABLE.Tsurugi 1.12.0 also adds support for the
EXTRACTfunction, which extracts a specific field from datetime types.The
EXTRACTfunction extracts fields such as year, month, day, hour, minute, and second from values of theDATE,TIME,TIMESTAMP, andTIMESTAMP WITH TIME ZONEtypes. In addition to the SQL standard notation, Tsurugi supports an extended notation that specifies the range to extract, such asYEAR TO HOUR.These features make it easier to handle time-series data, for example counting rows per day or per time slot, aggregating sales by month, or narrowing down the data to a specific year and month.
This version also includes several important bug fixes and stability improvements.
We strongly recommend all users of previous versions to upgrade to this release.
New Features and Improvements
New Features and Improvements - SQL
TRUNCATE TABLEstatementTRUNCATE TABLEis a statement that deletes all rows of the target table. Compared with aDELETEstatement without a condition, it can process tables with a large amount of data quickly. The table definition and indexes are kept.GENERATED ... AS IDENTITY), you can specify how the sequence is handled withRESTART IDENTITY/CONTINUE IDENTITY.Important
TRUNCATE TABLEis treated as a DDL statement, in the same way asCREATE TABLEandDROP TABLE.For this reason, the execution of
TRUNCATE TABLEcannot be undone by a rollback operation. There is no way to restore the deleted table data, so execute it only after checking carefully.Important
In this version, there is a restriction where
TRUNCATE TABLE ... RESTART IDENTITYcannot be used under certain conditions on tables that have an identity column. For details, see the following document:EXTRACTfunction, which extracts a field from datetime typesThe
EXTRACTfunction extracts a specific field from a value of theDATE,TIME,TIMESTAMP, orTIMESTAMP WITH TIME ZONEtype.In the SQL standard notation, you can specify
YEAR,MONTH,DAY,HOUR,MINUTE,SECOND,TIMEZONE_HOUR, andTIMEZONE_MINUTE. The return type isDECIMALforSECONDonly, andINTEGERfor the others.As an extended notation, Tsurugi also supports specifying the range to extract. You can specify
DATE,YEAR TO MONTH,YEAR TO DAY,YEAR TO HOUR,YEAR TO MINUTE, andYEAR TO SECOND, and the returned value has the fields below the specified range truncated. ForYEAR TO HOURand the finer ranges, onlyTIMESTAMP-family types can be specified as the operand.By using the
EXTRACTfunction in aWHEREclause condition, you can narrow down the data to a specific year or month.To group by the result of the
EXTRACTfunction, retrieve the result of theEXTRACTfunction as a column in aWITHclause or a subquery, and use that column in theGROUP BYclause.Note
In this version, the
EXTRACTfunction cannot be specified directly in aGROUP BYclause. Support in a future version is under consideration.For other detailed specifications and current restrictions on SQL features, see the following document in tsurugidb:
New Features and Improvements - UDF
endpointparameter in the[udf]section of the UDF plugin configuration file (<plugin-name>.ini) can now take multiple endpoints separated by a pipe character|. When multiple endpoints are specified, an endpoint is selected in round-robin fashion for each UDF invocation.--grpc-endpointand--grpc-server-endpointoptions ofudf-plugin-buildercan now also take multiple endpoints separated by a pipe character|.tsurugi.inican now also take multiple endpoints separated by a pipe character|.Note
For detailed specifications and current restrictions on UDF features, see the following document in tsurugi-udf:
For details on
tsurugi.ini, see the following document:New Features and Improvements - Client
2.0.1Bug Fixes
Bug Fixes - SQL
2^64(18446744073709551616) or greater specified in certain places in SQL that are not treated as numeric literals was handled as0CAST(NULL AS BIT(...))in an expression caused the database to terminate abnormally under certain conditionsDESCcausedINSERTinto that table to failSELECT COUNT(DISTINCT ...)on a large number of records resulted in an error or made the database unstableBug Fixes - Authentication & Authorization
tgctl credentialswas shorter than the default of 90 days, and the--expirationoption was not applied eitherBug Fixes - UDF
enabledin the[grpc_server]section oftsurugi.iniwasfalseudf-pluginfailed after the dependent scikit-build-core was updated to version1.0.0Upgrade Notes
Client Compatibility List
Tsurugi 1.12.0 supports the following clients.
Please upgrade each client as needed when upgrading Tsurugi.
Important
For Tsurugi UDF, you must regenerate and redeploy UDF plugins using
udf-plugin-builder.Upgrade Procedure
For instructions on upgrading from previous versions, see:
Other Information
For a full list of changes in this version, see the Changelog:
For known issues and additional information about fixes in this version, see:
This discussion was created from the release 1.12.0.
All reactions