Skip to content

Commit bc21d9c

Browse files
Merge branch 'griddb:master' into main
2 parents b63b0dc + 6c989de commit bc21d9c

File tree

113 files changed

+27979
-2707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+27979
-2707
lines changed

3rd_party/sqlite_mod/src/date.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,10 +883,10 @@ static void fromTimestampFunc(
883883
sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
884884
#endif
885885
if( pTm ){
886-
char tmpBuf[100];
886+
char tmpBuf[32];
887887
char zBuf[100] = "";
888-
strftime(tmpBuf, 100, "%Y-%m-%dT%H:%M:%S", &sNow);
889-
sprintf(zBuf, "%s.%dZ", tmpBuf, milli);
888+
strftime(tmpBuf, sizeof(tmpBuf), "%Y-%m-%dT%H:%M:%S", &sNow);
889+
snprintf(zBuf, sizeof(zBuf), "%s.%dZ", tmpBuf, milli);
890890
sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
891891
}
892892
}

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ Note:
2828
$ cd java_client
2929
$ ./make_source_for_mvn.sh
3030
$ mvn clean
31-
$ mvn install
31+
$ mvn package
3232

3333
### Start a server
3434
$ export GS_HOME=$PWD
3535
$ export GS_LOG=$PWD/log
3636
$ export PATH=${PATH}:$GS_HOME/bin
3737

38-
$ bin/gs_passwd admin
38+
$ gs_passwd admin
3939
#input your_password
4040
$ vi conf/gs_cluster.json
4141
# "clusterName":"your_clustername" #<-- input your_clustername
4242

43-
$ bin/gs_startnode
44-
$ bin/gs_joincluster -c your_clustername -u admin/your_password
43+
$ gs_startnode
44+
$ gs_joincluster -c your_clustername -u admin/your_password
4545

4646
### Execute a sample program
4747
$ export CLASSPATH=${CLASSPATH}:$GS_HOME/bin/gridstore.jar
@@ -52,8 +52,8 @@ Note:
5252
--> Person: name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]
5353

5454
### Stop a server
55-
$ bin/gs_stopcluster -u admin/your_password
56-
$ bin/gs_stopnode -u admin/your_password
55+
$ gs_stopcluster -u admin/your_password
56+
$ gs_stopnode -u admin/your_password
5757

5858
## [Quick start (Using GridDB Service and CLI)](docs/UsingServiceAndCLI.md)
5959

@@ -128,6 +128,7 @@ If necessary, please refer to [Installation Troubleshooting](docs/TroubleShootin
128128
- [V5.5 Release Notes](docs/GridDB-5.5-CE-RELEASE_NOTES.md)
129129
- [V5.6 Release Notes](docs/GridDB-5.6-CE-RELEASE_NOTES.md)
130130
- [V5.7 Release Notes](docs/GridDB-5.7-CE-RELEASE_NOTES.md)
131+
- [V5.8 Release Notes](docs/GridDB-5.8-CE-RELEASE_NOTES.md)
131132

132133
## Client and Connector
133134
There are other clients and API for GridDB.

README_ja.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ GridDBが提供する機能は『[GridDB 機能リファレンス](https://githu
3030
$ cd java_client
3131
$ ./make_source_for_mvn.sh
3232
$ mvn clean
33-
$ mvn install
33+
$ mvn package
3434

3535
### サーバの起動
3636
$ export GS_HOME=$PWD
@@ -129,6 +129,7 @@ GridDBが提供する機能は『[GridDB 機能リファレンス](https://githu
129129
* [V5.5 Release Notes](docs/GridDB-5.5-CE-RELEASE_NOTES_ja.md)
130130
* [V5.6 Release Notes](docs/GridDB-5.6-CE-RELEASE_NOTES_ja.md)
131131
* [V5.7 Release Notes](docs/GridDB-5.7-CE-RELEASE_NOTES_ja.md)
132+
* [V5.8 Release Notes](docs/GridDB-5.7-CE-RELEASE_NOTES_ja.md)
132133

133134
## クライアントとコネクタ
134135
Java以外のクライアント、APIもあります。

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AC_PREREQ(2.61)
2-
AC_INIT([GridDB], [5.7.0])
2+
AC_INIT([GridDB], [5.8.0])
33
AC_CONFIG_AUX_DIR([.])
44
AM_INIT_AUTOMAKE([subdir-objects])
55

debian/changelog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
griddb (5.7.0) unstable; urgency=medium
1+
griddb (5.8.0) unstable; urgency=medium
22

33
* Non-maintainer upload.

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Section: unknown
33
Priority: extra
44
Maintainer: Katsuhiko Nonomura <[email protected]>
55
Build-Depends: debhelper (>= 10)
6-
Standards-Version: 5.7.0
6+
Standards-Version: 5.8.0
77
Homepage: https://github.com/griddb/griddb
88

99
Package: griddb
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# GridDB CE 5.8
2+
3+
## Changes in V5.8
4+
5+
The main changes in GridDB CE version 5.8 are as follows:
6+
7+
- SQL Optimization Enhancements
8+
9+
Supported Join Optimization for the driving table, the inner table of SQL execution. The join plan can be generated with the cost-based method.
10+
11+
- Timeseries-data Functionality Enhancements
12+
13+
Supported moving average calculation for SQL analytic functions. And improved the accuracy of date arithmetic functions.
14+
15+
---
16+
17+
## SQL Optimization Enhancements
18+
19+
It is now possible to switch between cost-based and rule-based methods to select the driving table and the inner table for join operation, and this can be configured using the following:
20+
- Cluster definition file (gs_cluster.json)
21+
- Hint phase
22+
23+
Using the cluster definition file (gs_cluster.json):
24+
25+
* /sql/costBasedJoinDriving:Specifies whether to use the cost-based method for determining the driving table for join during SQL plan generation. If set to false, it uses the rule-based method. The default value is true, which indicates the cost-based method.
26+
27+
28+
Using the hint phase:
29+
30+
* CostBasedJoinDriving():Use the cost-based method for determining the driving table for join.
31+
* NoCostBasedJoinDriving():Use the rule-based method for determining the driving table for join.
32+
33+
## Timeseries-data Functionality Enhancements
34+
35+
### Supported moving average calculation for SQL analytic functions
36+
37+
38+
Added FRAME clause for SQL analytic functions
39+
40+
``` example
41+
function OVER ( [PARTITION BY expression1 ] [ ORDER BY expression2 ] [ FRAME-clause ] )
42+
```
43+
44+
The syntax of FRAME-clause is as bellow:
45+
46+
``` example
47+
ROWS | RANGE <FRAME-start-value> | BETWEEN <FRAME-start-value> AND <FRAME-end-value>
48+
```
49+
50+
The syntax of the start value and the end value of Frame is as bellow:
51+
52+
``` example
53+
UNBOUNDED PRECEDING | UNBOUNDED FOLLOWING | CURRENT ROW | <Frame-boundary1> PRECEDING | <Frame-boundary2> FOLLOWING
54+
```
55+
56+
- CURRENT ROW: Specify the current row to be analyzed
57+
- UNBOUNDED: Specify the head or the tail of the partition
58+
- PRECEDING/FOLLOWING: Specify preceding or following
59+
60+
The syntax of the boundary of Frame is as bellow:
61+
62+
``` example
63+
value1 | ( value2, unit )
64+
```
65+
66+
- The following functions can be specified the FRAME-clause.
67+
68+
AVG、COUNT、MAX、MIN、SUM、TOTAL、STDDEV、VAR
69+
70+
- The following functions can not be specified the FRAME-clause.
71+
72+
ROW_NUMBER、LAG、LEAD
73+
74+
例)
75+
76+
Calculate the moving average for the previous 10 rows.
77+
78+
``` example
79+
SELECT
80+
AVG(value1)
81+
OVER(ORDER BY time)
82+
ROWS BETWEEN 10 PRECEDING AND CURRENT ROW
83+
FROM tbl1;
84+
```
85+
86+
Calculate the moving average for the period up to 10 minutes prior to each row.
87+
88+
``` example
89+
SELECT
90+
AVG(value1)
91+
OVER(ORDER BY time)
92+
RANGE BETWEEN (10, MINUTE) PRECEDING AND CURRENT ROW
93+
FROM tbl1;
94+
```
95+
96+
### Improved the accuracy of date arithmetic functions
97+
98+
Added the following functions for SQL and TQL(query language for NoSQL Interface).
99+
100+
- SQL
101+
``` example
102+
* TIMESTAMP_MS(timestamp_string [, timezone]):Converts a string representation of the time to a TIMESTAMP(3) type with millisecond precision.
103+
* TIMESTAMP_US(timestamp_string [, timezone]):Converts a string representation of the time to a TIMESTAMP(6) type with microsecond precision.
104+
* TIMESTAMP_NS(timestamp_string [, timezone]):Converts a string representation of the time to a TIMESTAMP(9) type with nanosecond precision.
105+
```
106+
107+
- TQL
108+
``` example
109+
* TIMESTAMP_MS(str):Converts a string representation of the time to a TIMESTAMP(3) type with millisecond precision.
110+
* TIMESTAMP_US(str):Converts a string representation of the time to a TIMESTAMP(6) type with microsecond precision.
111+
* TIMESTAMP_NS(str):Converts a string representation of the time to a TIMESTAMP(9) type with nanosecond precision.
112+
```
113+
114+
And The following functions now support calculations with microsecond and nanosecond precision:
115+
116+
- SQL
117+
``` example
118+
* TIMESTAMP_ADD(time_unit, timestamp, duration [, timezone])/TIMESTAMP_DIFF(time_unit, timestamp1, timestamp2 [, timezone])
119+
```
120+
121+
- TQL
122+
``` example
123+
* TIMESTAMPADD(time_unit, timestamp, duration)/TIMESTAMPDIFF(time_unit, timestamp1, timestamp2)
124+
Note: We have also added TIMESTAMP_ADD()/TIMESTAMP_DIFF(), which have the same names as the SQL functions.
125+
```
126+
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# GridDB CE 5.8
2+
3+
## 変更点
4+
5+
GridDB CE V5.8の主な変更点は以下のとおりです。
6+
7+
- SQL最適化の強化
8+
9+
SQL検索実行時におけるジョイン方向(駆動表・内部表)の最適化を強化しました。従来のSQLプランでは、ジョイン演算の方向はユーザが記述したSELECT文の内容や順序に基づき、ルールを用いて決定されていました。そのため、ユーザはルールを理解し、テーブル規模や絞込み条件に応じて適切なプランが生成されるようにSELECT文を記述する必要がありました。今回の強化により、検索実行中に算出されるロウ数(テーブル規模や絞込み条件を考慮した概算値)をコストとして計算し、このコストを基にジョイン方向を最適化したプランを生成できるようになりました。
10+
11+
- 時系列データ管理・検索機能の強化
12+
13+
SQL分析関数機能強化(移動平均演算):SQL実行機能における分析関数のオプション構文として、SQL標準で定義されているフレーム句(分析対象とするデータ範囲の件数・幅指定)に対応しました。これにより、SQLを用いた時系列データのトレンド分析が容易に実現できるようになりました。
14+
15+
日付演算機能の精度向上:現状のSQLによる日時型演算機能の一部で行えなかった、マイクロ秒・ナノ秒精度の演算が可能となりました。
16+
17+
---
18+
19+
## SQL最適化の強化
20+
21+
結合処理において、最初にアクセスするテーブルを駆動表、次にアクセスして結合するテーブルを内部表といいます。駆動表の決め方には、コストベースによる方法とルールベースによる方法の2種類あります。いずれを用いるかは以下を使って設定できます。
22+
- クラスタ定義ファイル(gs_cluster.json)
23+
- ヒント
24+
25+
クラスタ定義ファイル(gs_cluster.json)を使う場合:
26+
27+
* /sql/costBasedJoinDriving:SQLプラン生成の際、ジョイン方向(駆動表・内部表)の決定にコストベースによる方法を用いるかどうかを指定します。用いない(false)場合は、ルールベースを用いて駆動表を決定します。デフォルト値はコストベースによる方法(true)です。
28+
29+
ヒントを使う場合:
30+
31+
* CostBasedJoinDriving():コストベースによる方法で駆動表を決定します。
32+
* NoCostBasedJoinDriving():コストベースによる方法を用いないで、ルールベースによる方法で駆動表を決定します。
33+
34+
## 時系列データ管理・検索機能の強化
35+
36+
### SQL分析関数機能強化(移動平均演算)
37+
38+
分析関数にFRAME句が追加されました。
39+
40+
FRAME句はパーティション全体ではなくフレーム上で作動するウィンドウ関数に対して、ウィンドウフレームを構成する行の集合を指定します。
41+
42+
``` example
43+
関数 OVER ( [PARTITION BY 式1 ] [ ORDER BY 式2 ] [ FRAME句 ] )
44+
```
45+
46+
ここで、FRAME句の構文は以下の通りです。
47+
48+
``` example
49+
ROWS | RANGE <フレーム開始値> | BETWEEN <フレーム開始値> AND <フレーム終了値>
50+
```
51+
52+
フレーム開始値・終了値の構文は以下の通りです。
53+
54+
``` example
55+
UNBOUNDED PRECEDING | UNBOUNDED FOLLOWING | CURRENT ROW | <フレーム境界値1> PRECEDING | <フレーム境界値2> FOLLOWING
56+
```
57+
58+
- CURRENT ROW: 分析対象の現在位置のロウを示します
59+
- UNBOUNDED: パーティションの先頭もしくは末端を示します
60+
- PRECEDING/FOLLOWING: 前方もしくは後方を示します
61+
62+
フレーム境界値の構文は以下の通りです。
63+
64+
``` example
65+
値1 | ( 値2, 単位 )
66+
```
67+
68+
- 同名の集計関数と対応づく既存の分析関数すべてで、FRAME句を指定できます。
69+
70+
AVG、COUNT、MAX、MIN、SUM、TOTAL、STDDEV、VAR
71+
72+
- 同名の集計関数と対応付かない以下の分析関数では、FRAME句を指定できません。
73+
74+
ROW_NUMBER、LAG、LEAD
75+
76+
例)
77+
78+
各ロウの10件前までを集計対象とする移動平均を求める。
79+
80+
``` example
81+
SELECT
82+
AVG(value1)
83+
OVER(ORDER BY time)
84+
ROWS BETWEEN 10 PRECEDING AND CURRENT ROW
85+
FROM tbl1;
86+
```
87+
各ロウの10分前までを集計対象とする移動平均を求める。
88+
89+
``` example
90+
SELECT
91+
AVG(value1)
92+
OVER(ORDER BY time)
93+
RANGE BETWEEN (10, MINUTE) PRECEDING AND CURRENT ROW
94+
FROM tbl1;
95+
```
96+
97+
### 日付演算機能の精度向上
98+
99+
SQLおよびTQLに以下の関数を追加しました。
100+
101+
- SQL
102+
``` example
103+
* TIMESTAMP_MS(timestamp_string [, timezone]):時刻の文字列表現timestamp_stringの値を、ミリ秒精度のTIMESTAMP(3)型に変換します。
104+
* TIMESTAMP_US(timestamp_string [, timezone]):時刻の文字列表現timestamp_stringの値を、マイクロ秒精度のTIMESTAMP(6)型に変換します。
105+
* TIMESTAMP_NS(timestamp_string [, timezone]):時刻の文字列表現timestamp_stringの値を、ナノ秒精度のTIMESTAMP(9)型に変換します。
106+
```
107+
108+
- TQL
109+
``` example
110+
* TIMESTAMP_MS(str):時刻の文字列表現をミリ秒精度のTIMESTAMP(3)型に変換します。
111+
* TIMESTAMP_US(str):時刻の文字列表現をマイクロ秒精度のTIMESTAMP(6)型に変換します。
112+
* TIMESTAMP_NS(str):時刻の文字列表現をナノ秒精度のTIMESTAMP(9)型に変換します。
113+
```
114+
115+
また、以下の関数でマイクロ秒・ナノ秒精度の演算が可能となりました。
116+
117+
- SQL
118+
``` example
119+
* TIMESTAMP_ADD(time_unit, timestamp, duration [, timezone])/TIMESTAMP_DIFF(time_unit, timestamp1, timestamp2 [, timezone])
120+
```
121+
122+
- TQL
123+
``` example
124+
* TIMESTAMPADD(time_unit, timestamp, duration)/TIMESTAMPDIFF(time_unit, timestamp1, timestamp2)
125+
※ SQLの関数と同名のTIMESTAMP_ADD()/TIMESTAMP_DIFF()も追加しました。
126+
```
127+

docs/RELEASE_NOTES_ja.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
* [V5.3 Release Notes](GridDB-5.3-CE-RELEASE_NOTES_ja.md)
1313
* [V5.5 Release Notes](GridDB-5.5-CE-RELEASE_NOTES_ja.md)
1414
* [V5.6 Release Notes](GridDB-5.6-CE-RELEASE_NOTES_ja.md)
15-
* [V5.7 Release Notes](GridDB-5.7-CE-RELEASE_NOTES_ja.md)
15+
* [V5.7 Release Notes](GridDB-5.7-CE-RELEASE_NOTES_ja.md)
16+
* [V5.8 Release Notes](GridDB-5.8-CE-RELEASE_NOTES_ja.md)

installer/SPECS/griddb.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%define griddb_name griddb
2-
%define griddb_ver 5.7.0
2+
%define griddb_ver 5.8.0
33
%define griddb_instdir /usr/griddb-%{griddb_ver}
44
%define griddb_homedir /var/lib/gridstore
55
# do not strip
@@ -434,6 +434,8 @@ fi
434434
/usr/griddb/bin/gridstore
435435

436436
%changelog
437+
* Wed Nov 13 2024 Toshiba Digital Solutions Corporation
438+
- 5.7.0
437439
* Thu May 30 2024 Toshiba Digital Solutions Corporation
438440
- 5.6.0
439441
* Wed Feb 07 2024 Toshiba Digital Solutions Corporation

0 commit comments

Comments
 (0)