Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
de5f2b14
提交
de5f2b14
authored
6 年前
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Better error messages
上级
e0b3e410
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
21 行增加
和
20 行删除
+21
-20
_messages_en.prop
h2/src/docsrc/textbase/_messages_en.prop
+1
-1
ErrorCode.java
h2/src/main/org/h2/api/ErrorCode.java
+1
-1
DataAnalysisOperation.java
...ain/org/h2/expression/analysis/DataAnalysisOperation.java
+1
-1
WindowFrame.java
h2/src/main/org/h2/expression/analysis/WindowFrame.java
+4
-3
_messages_cs.prop
h2/src/main/org/h2/res/_messages_cs.prop
+1
-1
_messages_de.prop
h2/src/main/org/h2/res/_messages_de.prop
+1
-1
_messages_en.prop
h2/src/main/org/h2/res/_messages_en.prop
+1
-1
_messages_es.prop
h2/src/main/org/h2/res/_messages_es.prop
+1
-1
_messages_fr.prop
h2/src/main/org/h2/res/_messages_fr.prop
+1
-1
_messages_ja.prop
h2/src/main/org/h2/res/_messages_ja.prop
+1
-1
_messages_pl.prop
h2/src/main/org/h2/res/_messages_pl.prop
+1
-1
_messages_pt_br.prop
h2/src/main/org/h2/res/_messages_pt_br.prop
+1
-1
_messages_ru.prop
h2/src/main/org/h2/res/_messages_ru.prop
+1
-1
_messages_sk.prop
h2/src/main/org/h2/res/_messages_sk.prop
+1
-1
_messages_zh_cn.prop
h2/src/main/org/h2/res/_messages_zh_cn.prop
+1
-1
array-agg.sql
...est/org/h2/test/scripts/functions/aggregate/array-agg.sql
+1
-1
window.sql
h2/src/test/org/h2/test/scripts/window.sql
+2
-2
没有找到文件。
h2/src/docsrc/textbase/_messages_en.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=Numeric value out of range: {0} in column {1}
22007=Cannot parse {0} constant {1}
22012=Division by zero: {0}
22013=Invalid
preceding of following size in window function
22013=Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=Data conversion error converting {0}
22025=Error in LIKE ESCAPE: {0}
22030=Value not permitted for column {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/api/ErrorCode.java
浏览文件 @
de5f2b14
...
...
@@ -140,7 +140,7 @@ public class ErrorCode {
* FIRST_VALUE(N) OVER(ORDER BY N ROWS -1 PRECEDING)
* </pre>
*/
public
static
final
int
INVALID_PRECEDING_OR_FOLLOWING
=
22013
;
public
static
final
int
INVALID_PRECEDING_OR_FOLLOWING
_1
=
22013
;
/**
* The error with code <code>22018</code> is thrown when
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/expression/analysis/DataAnalysisOperation.java
浏览文件 @
de5f2b14
...
...
@@ -196,7 +196,7 @@ public abstract class DataAnalysisOperation extends Expression {
private
DbException
getSingleSortKeyException
()
{
String
sql
=
getSQL
();
return
DbException
.
getSyntaxError
(
sql
,
sql
.
length
()
-
1
,
"
singl
e sort key is required for RANGE units"
);
return
DbException
.
getSyntaxError
(
sql
,
sql
.
length
()
-
1
,
"
exactly on
e sort key is required for RANGE units"
);
}
@Override
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/expression/analysis/WindowFrame.java
浏览文件 @
de5f2b14
...
...
@@ -293,7 +293,7 @@ public final class WindowFrame {
Value
v
=
bound
.
isVariable
()
?
values
[
bound
.
getExpressionIndex
()]
:
bound
.
getValue
().
getValue
(
session
);
int
value
=
v
.
getInt
();
if
(
v
==
ValueNull
.
INSTANCE
||
value
<
0
)
{
throw
DbException
.
get
(
ErrorCode
.
INVALID_PRECEDING_OR_FOLLOWING
);
throw
DbException
.
get
(
ErrorCode
.
INVALID_PRECEDING_OR_FOLLOWING
_1
,
v
.
getTraceSQL
()
);
}
return
value
;
}
...
...
@@ -368,7 +368,8 @@ public final class WindowFrame {
}
break
;
default
:
throw
DbException
.
getInvalidValueException
(
"ORDER BY value for RANGE frame"
,
currentValue
.
getTraceSQL
());
throw
DbException
.
getInvalidValueException
(
"unsupported type of sort key for RANGE units"
,
currentValue
.
getTraceSQL
());
}
Value
[]
newRow
=
row
.
clone
();
newRow
[
sortIndex
]
=
newValue
;
...
...
@@ -378,7 +379,7 @@ public final class WindowFrame {
private
static
Value
getValueOffset
(
WindowFrameBound
bound
,
Value
[]
values
,
Session
session
)
{
Value
value
=
bound
.
isVariable
()
?
values
[
bound
.
getExpressionIndex
()]
:
bound
.
getValue
().
getValue
(
session
);
if
(
value
==
ValueNull
.
INSTANCE
||
value
.
getSignum
()
<
0
)
{
throw
DbException
.
get
(
ErrorCode
.
INVALID_PRECEDING_OR_FOLLOWING
);
throw
DbException
.
get
(
ErrorCode
.
INVALID_PRECEDING_OR_FOLLOWING
_1
,
value
.
getTraceSQL
()
);
}
return
value
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_cs.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=#Numeric value out of range: {0} in column {1}
22007=Nelze zpracovat konstantu {0} {1}
22012=Dělení nulou: {0}
22013=#Invalid
preceding of following size in window function
22013=#Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=Chyba při převodu dat {0}
22025=Chyba v LIKE escapování: {0}
22030=#Value not permitted for column {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_de.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=Numerischer Wert ausserhalb des Bereichs: {0} in Feld {1}
22007=Kann {0} {1} nicht umwandeln
22012=Division durch 0: {0}
22013=#Invalid
preceding of following size in window function
22013=#Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=Datenumwandlungsfehler beim Umwandeln von {0}
22025=Fehler in LIKE ESCAPE: {0}
22030=Wert nicht erlaubt für Feld {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_en.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=Numeric value out of range: {0} in column {1}
22007=Cannot parse {0} constant {1}
22012=Division by zero: {0}
22013=Invalid
preceding of following size in window function
22013=Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=Data conversion error converting {0}
22025=Error in LIKE ESCAPE: {0}
22030=Value not permitted for column {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_es.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=#Numeric value out of range: {0} in column {1}
22007=Imposible interpretar la constante {0} {1}
22012=División por cero: {0}
22013=#Invalid
preceding of following size in window function
22013=#Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=Conversión de datos fallida, convirtiendo {0}
22025=Error en LIKE ESCAPE: {0}
22030=Valor no permitido para la columna {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_fr.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=#Numeric value out of range: {0} in column {1}
22007=Impossible d''analyser {0} constante {1}
22012=Division par zéro: {0}
22013=#Invalid
preceding of following size in window function
22013=#Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=Erreur lors de la conversion de données {0}
22025=Erreur dans LIKE ESCAPE: {0}
22030=Valeur non permise pour la colonne {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_ja.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=#Numeric value out of range: {0} in column {1}
22007={0} 定数 {1} を解析できません
22012=ゼロで除算しました: {0}
22013=#Invalid
preceding of following size in window function
22013=#Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=データ変換中にエラーが発生しました {0}
22025=LIKE ESCAPE にエラーがあります: {0}
22030=#Value not permitted for column {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_pl.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=#Numeric value out of range: {0} in column {1}
22007=Nie można odczytać {0} jako {1}
22012=Dzielenie przez zero: {0}
22013=#Invalid
preceding of following size in window function
22013=#Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=Błąd konwersji danych {0}
22025=Błąd w LIKE ESCAPE: {0}
22030=#Value not permitted for column {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_pt_br.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=#Numeric value out of range: {0} in column {1}
22007=Não é possível converter {1} para {0}
22012=Divisão por zero: {0}
22013=#Invalid
preceding of following size in window function
22013=#Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=Erro na conversão de dado, convertendo {0}
22025=Erro em LIKE ESCAPE: {0}
22030=#Value not permitted for column {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_ru.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=Численное значение вне допустимого диапазона: {0} в столбце {1}
22007=Невозможно преобразование строки {1} в тип {0}
22012=Деление на ноль: {0}
22013=Недопустимое значение
preceding или following в оконной функции
22013=Недопустимое значение
PRECEDING или FOLLOWING в оконной функции: {0}
22018=Ошибка преобразования данных при конвертации {0}
22025=Ошибка в LIKE ESCAPE: {0}
22030=Недопустимое значение для столбца {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_sk.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=#Numeric value out of range: {0} in column {1}
22007=Nemožem rozobrať {0} konštantu {1}
22012=Delenie nulou: {0}
22013=#Invalid
preceding of following size in window function
22013=#Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=Chyba konverzie dát pre {0}
22025=Chyba v LIKE ESCAPE: {0}
22030=#Value not permitted for column {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_zh_cn.prop
浏览文件 @
de5f2b14
...
...
@@ -8,7 +8,7 @@
22004=#Numeric value out of range: {0} in column {1}
22007=不能解析字段 {0} 的数值 :{1}
22012=除数为零: {0}
22013=#Invalid
preceding of following size in window function
22013=#Invalid
PRECEDING or FOLLOWING size in window function: {0}
22018=转换数据{0}期间出现转换错误
22025=LIKE ESCAPE(转义符)存在错误: {0}
22030=#Value not permitted for column {0}: {1}
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/scripts/functions/aggregate/array-agg.sql
浏览文件 @
de5f2b14
...
...
@@ -345,7 +345,7 @@ SELECT *,
>
rows
:
8
SELECT
*
,
ARRAY_AGG
(
ID
)
OVER
(
ORDER
BY
VALUE
ROWS
-
1
PRECEDING
)
FROM
TEST
;
>
exception
INVALID_PRECEDING_OR_FOLLOWING
>
exception
INVALID_PRECEDING_OR_FOLLOWING
_1
SELECT
*
,
ARRAY_AGG
(
ID
)
OVER
(
ORDER
BY
ID
ROWS
BETWEEN
2
PRECEDING
AND
1
PRECEDING
)
FROM
TEST
FETCH
FIRST
4
ROWS
ONLY
;
>
ID
VALUE
ARRAY_AGG
(
ID
)
OVER
(
ORDER
BY
ID
ROWS
BETWEEN
2
PRECEDING
AND
1
PRECEDING
)
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/scripts/window.sql
浏览文件 @
de5f2b14
...
...
@@ -110,10 +110,10 @@ SELECT ROW_NUMBER() OVER (ORDER BY CATEGORY), SUM(ID) FROM TEST GROUP BY CATEGOR
>
rows
:
1
SELECT
SUM
(
ID
)
OVER
(
ORDER
BY
ID
ROWS
NULL
PRECEDING
)
P
FROM
TEST
;
>
exception
INVALID_PRECEDING_OR_FOLLOWING
>
exception
INVALID_PRECEDING_OR_FOLLOWING
_1
SELECT
SUM
(
ID
)
OVER
(
ORDER
BY
ID
RANGE
NULL
PRECEDING
)
P
FROM
TEST
;
>
exception
INVALID_PRECEDING_OR_FOLLOWING
>
exception
INVALID_PRECEDING_OR_FOLLOWING
_1
SELECT
ARRAY_AGG
(
ID
)
OVER
(
ORDER
BY
V
NULLS
FIRST
RANGE
BETWEEN
1
PRECEDING
AND
UNBOUNDED
FOLLOWING
)
A
,
ID
,
V
FROM
VALUES
(
1
,
1
),
(
2
,
NULL
),
(
3
,
2
)
T
(
ID
,
V
)
ORDER
BY
V
NULLS
FIRST
;
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论