Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
958a442
[Windows / SQLite (specialized tests)] baselines
Apr 16, 2026
29f647f
[Windows / SQL Server 2005] baselines
Apr 16, 2026
7e18a53
[Windows / SQLite (both providers)] baselines
Apr 16, 2026
0d12f73
[Windows / SQL Server 2008] baselines
Apr 16, 2026
119d58c
[Windows / SQL Server 2012] baselines
Apr 16, 2026
c9549cf
[Windows / SQL Server 2014] baselines
Apr 16, 2026
4b4473a
[Linux / Firebird 3.0] baselines
Apr 16, 2026
bafd62b
[Windows / SQL Server 2016] baselines
Apr 16, 2026
bfb3a5f
[Linux / DB2 LUW 11.5] baselines
Apr 16, 2026
45971a5
[Linux / Firebird 5.0] baselines
Apr 16, 2026
259d5c8
[Linux / Firebird 4.0] baselines
Apr 16, 2026
b24790c
[Linux / MariaDB 11] baselines
Apr 16, 2026
eb14f53
[Linux / MySQL 9 (both providers)] baselines
Apr 16, 2026
8a31174
[Linux / ClickHouse MySql] baselines
Apr 16, 2026
75e19de
[Windows / SQL Server 2017] baselines
Apr 16, 2026
e1d7c8f
[Linux / ClickHouse Driver] baselines
Apr 16, 2026
6ab0b32
[Linux / Oracle 11g XE] baselines
Apr 16, 2026
6c1b2ab
[Windows / SQL Server 2019] baselines
Apr 16, 2026
7dacd82
[Windows / SQL Server 2022] baselines
Apr 16, 2026
ccb9456
[Linux / PostgreSQL 13] baselines
Apr 16, 2026
7cddfeb
[Linux / PostgreSQL 14] baselines
Apr 16, 2026
8ba24f8
[Linux / Oracle 12c] baselines
Apr 16, 2026
7a13f68
[Linux / Oracle 23c] baselines
Apr 16, 2026
bc20b20
[Linux / PostgreSQL 16] baselines
Apr 16, 2026
91609bd
[Linux / PostgreSQL 15] baselines
Apr 16, 2026
8beddcf
[Linux / Oracle 18c] baselines
Apr 16, 2026
7cb7d26
[Linux / PostgreSQL 17] baselines
Apr 16, 2026
9b7bdf3
[Linux / Oracle 19c] baselines
Apr 16, 2026
2cab5f2
[Linux / Oracle 21c] baselines
Apr 16, 2026
c491ccf
[Linux / PostgreSQL 18] baselines
Apr 16, 2026
faf906e
[Windows / SQL Server 2025] baselines
Apr 16, 2026
5ca266e
[Windows / SQL Server EXTRAS] baselines
Apr 16, 2026
06bc3da
[Linux / SQLite (both providers)] baselines
Apr 16, 2026
e9975c9
[Linux / SAP HANA 2] baselines
Apr 16, 2026
07f2068
[Linux / Informix 14.10] baselines
Apr 16, 2026
5b8b2a5
[Windows / SQLite (both providers)] baselines
Apr 22, 2026
19cb831
[Linux / Firebird 4.0] baselines
Apr 22, 2026
4db874c
[Linux / Firebird 5.0] baselines
Apr 22, 2026
ef71d2c
[Linux / SQLite (both providers)] baselines
Apr 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
-- ClickHouse.Driver ClickHouse

SELECT
SUM(CASE
WHEN t.CategoryId = 1 THEN t.IntValue
ELSE NULL
END) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
SUM(CASE
WHEN t.IntValue > 20 THEN t.IntValue
ELSE NULL
END) OVER (ORDER BY t.Id ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW),
SUM(CASE
WHEN t.IntValue > 10 THEN t.IntValue
ELSE NULL
END) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING),
AVG(CASE
WHEN t.DoubleValue > toFloat64(15) THEN t.DoubleValue
ELSE NULL
END) OVER (ORDER BY t.Id RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW),
MIN(CASE
WHEN t.IntValue > 10 THEN t.IntValue
ELSE NULL
END) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
MAX(CASE
WHEN t.IntValue < 80 THEN t.IntValue
ELSE NULL
END) OVER (ORDER BY t.Id ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW),
COUNT(CASE
WHEN t.IntValue > 20 THEN 1
ELSE NULL
END) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- ClickHouse.Driver ClickHouse

SELECT
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING),
SUM(t.IntValue) OVER (ORDER BY t.Id RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW),
AVG(t.DoubleValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN 1 PRECEDING AND CURRENT ROW),
COUNT(*) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- ClickHouse.Driver ClickHouse

SELECT
AVG(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableIntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.LongValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableLongValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.DoubleValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableDoubleValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.DecimalValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableDecimalValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.FloatValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableFloatValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.ShortValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableShortValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.ByteValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableByteValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- ClickHouse.Driver ClickHouse

SELECT
AVG(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableIntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.LongValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableLongValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.DoubleValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableDoubleValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.DecimalValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableDecimalValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.FloatValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableFloatValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.ShortValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableShortValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.ByteValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.NullableByteValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- ClickHouse.Driver ClickHouse

SELECT
AVG(CASE
WHEN t.CategoryId = 1 THEN t.DoubleValue
ELSE NULL
END) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
COUNT(*) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
COUNT(*) OVER (ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- ClickHouse.Driver ClickHouse

SELECT
COUNT(*) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- ClickHouse.Driver ClickHouse

SELECT
COUNT(CASE
WHEN t.IntValue > 20 THEN 1
ELSE NULL
END) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- ClickHouse.Driver ClickHouse

SELECT
ROW_NUMBER() OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
RANK() OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
AVG(t.DoubleValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
MIN(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
MAX(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
COUNT(*) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
LEAD(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id),
LAG(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
FIRST_VALUE(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING),
LAST_VALUE(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-- ClickHouse.Driver ClickHouse

SELECT
x.Id,
x.Name,
x.CategoryId,
x.Value,
x.Timestamp,
x.IntValue,
x.NullableIntValue,
x.LongValue,
x.NullableLongValue,
x.DoubleValue,
x.NullableDoubleValue,
x.DecimalValue,
x.NullableDecimalValue,
x.FloatValue,
x.NullableFloatValue,
x.ShortValue,
x.NullableShortValue,
x.ByteValue,
x.NullableByteValue,
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Timestamp),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Value),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Timestamp DESC),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Value DESC),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Timestamp, x.Value),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Timestamp DESC, x.Value DESC)
FROM
WindowFunctionTestEntity x
ORDER BY
x.Id

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-- ClickHouse.Driver ClickHouse

SELECT
x.Id,
x.Name,
x.CategoryId,
x.Value,
x.Timestamp,
x.IntValue,
x.NullableIntValue,
x.LongValue,
x.NullableLongValue,
x.DoubleValue,
x.NullableDoubleValue,
x.DecimalValue,
x.NullableDecimalValue,
x.FloatValue,
x.NullableFloatValue,
x.ShortValue,
x.NullableShortValue,
x.ByteValue,
x.NullableByteValue,
DENSE_RANK() OVER (PARTITION BY x.CategoryId ORDER BY x.Timestamp),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Value),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Timestamp DESC),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Value DESC),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Timestamp, x.Value),
DENSE_RANK() OVER (PARTITION BY x.CategoryId, x.Name ORDER BY x.Timestamp DESC, x.Value DESC)
FROM
WindowFunctionTestEntity x
ORDER BY
x.Id

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
-- ClickHouse.Driver ClickHouse

SELECT
x.Id,
x.Name,
x.CategoryId,
x.Value,
x.Timestamp,
x.IntValue,
x.NullableIntValue,
x.LongValue,
x.NullableLongValue,
x.DoubleValue,
x.NullableDoubleValue,
x.DecimalValue,
x.NullableDecimalValue,
x.FloatValue,
x.NullableFloatValue,
x.ShortValue,
x.NullableShortValue,
x.ByteValue,
x.NullableByteValue,
DENSE_RANK() OVER (PARTITION BY x.CategoryId ORDER BY CASE
WHEN x.Timestamp IS NULL THEN 0
ELSE 1
END, x.Timestamp),
DENSE_RANK() OVER (PARTITION BY x.CategoryId ORDER BY CASE
WHEN x.Timestamp IS NULL THEN 1
ELSE 0
END, x.Timestamp DESC)
FROM
WindowFunctionTestEntity x
ORDER BY
x.Id

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-- ClickHouse.Driver ClickHouse

SELECT
x.Id,
x.Name,
x.CategoryId,
x.Value,
x.Timestamp,
x.IntValue,
x.NullableIntValue,
x.LongValue,
x.NullableLongValue,
x.DoubleValue,
x.NullableDoubleValue,
x.DecimalValue,
x.NullableDecimalValue,
x.FloatValue,
x.NullableFloatValue,
x.ShortValue,
x.NullableShortValue,
x.ByteValue,
x.NullableByteValue,
DENSE_RANK() OVER (ORDER BY x.Timestamp),
DENSE_RANK() OVER (ORDER BY x.Value),
DENSE_RANK() OVER (ORDER BY x.Timestamp DESC),
DENSE_RANK() OVER (ORDER BY x.Value DESC),
DENSE_RANK() OVER (ORDER BY x.Timestamp, x.Value),
DENSE_RANK() OVER (ORDER BY x.Timestamp DESC, x.Value DESC)
FROM
WindowFunctionTestEntity x
ORDER BY
x.Id

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
t.Id,
FIRST_VALUE(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
t.Id,
FIRST_VALUE(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
t.Id,
FIRST_VALUE(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- ClickHouse.Driver ClickHouse

SELECT
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id RANGE BETWEEN CURRENT ROW AND CURRENT ROW),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id RANGE BETWEEN CURRENT ROW AND CURRENT ROW)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id RANGE BETWEEN 1 PRECEDING AND 2 FOLLOWING),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id RANGE BETWEEN 1 PRECEDING AND 2 FOLLOWING)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-- ClickHouse.Driver ClickHouse

SELECT
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN CURRENT ROW AND CURRENT ROW),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN 1 PRECEDING AND 2 FOLLOWING),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN CURRENT ROW AND CURRENT ROW),
SUM(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN 1 PRECEDING AND 2 FOLLOWING)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
t.Id,
LAG(t.IntValue) OVER (ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
t.Id,
LAG(t.IntValue, 2) OVER (ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
t.Id,
LAG(t.IntValue, 2, 0) OVER (ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
t.Id,
LAG(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id)
FROM
WindowFunctionTestEntity t

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-- ClickHouse.Driver ClickHouse

SELECT
t.Id,
LAST_VALUE(t.IntValue) OVER (PARTITION BY t.CategoryId ORDER BY t.Id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
FROM
WindowFunctionTestEntity t

Loading