Skip to content

Commit a2cd63d

Browse files
committed
bumb version to 1.4.0, cleanup the istore related tests
1 parent 9b682a5 commit a2cd63d

12 files changed

+8
-815
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2-
project(clickhouse_fdw VERSION 1.3.0 LANGUAGES C)
2+
project(clickhouse_fdw VERSION 1.4.0 LANGUAGES C)
33

44
set(CMAKE_COLOR_MAKEFILE ON)
55
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
@@ -53,8 +53,6 @@ LIST(APPEND REGRESS_TESTS
5353
http
5454
binary
5555
import_schema
56-
istore
57-
istore_binary
5856
binary_queries
5957
binary_inserts
6058
functions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ uses UTC timezone.
2020
###### Installing `clickhouse_fdw`
2121

2222
```
23-
git clone <repository_link>.git
23+
git clone git@github.com:ildus/clickhouse_fdw.git
2424
cd clickhouse_fdw
2525
mkdir build && cd build
2626
cmake ..

run_tests.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ make clean
3131
make -j10
3232
make install
3333

34-
git clone https://github.com/adjust/istore.git
35-
pushd istore
36-
make && make install
37-
popd
38-
3934
# check build
4035
status=$?
4136
if [ $status -ne 0 ]; then exit $status; fi

src/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2-
project(clickhouse_fdw VERSION 1.2.0 LANGUAGES C CXX)
2+
project(clickhouse_fdw VERSION 1.4.0 LANGUAGES C CXX)
33

44
include (clickhouse-cpp/cmake/cpp17.cmake)
55

@@ -76,14 +76,15 @@ set(sql_out "${CMAKE_BINARY_DIR}/clickhouse_fdw--${EXT_VERSION}.sql")
7676
set(sql_migration_11 "${CMAKE_CURRENT_SOURCE_DIR}/sql/clickhouse_fdw--1.0--1.1.sql")
7777
set(sql_migration_12 "${CMAKE_CURRENT_SOURCE_DIR}/sql/clickhouse_fdw--1.1--1.2.sql")
7878
set(sql_migration_13 "${CMAKE_CURRENT_SOURCE_DIR}/sql/clickhouse_fdw--1.2--1.3.sql")
79+
set(sql_migration_14 "${CMAKE_CURRENT_SOURCE_DIR}/sql/clickhouse_fdw--1.3--1.4.sql")
7980

8081
add_custom_command(
8182
OUTPUT ${sql_out}
8283
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/sql/init.sql ${CMAKE_CURRENT_SOURCE_DIR}/sql/functions.sql> ${sql_out}
8384
DEPENDS sql/init.sql sql/functions.sql
8485
)
8586
add_custom_target(clickhouse_fdw_sql
86-
ALL DEPENDS ${sql_out} ${sql_migration_11} ${sql_migration_12} ${sql_migration_13})
87+
ALL DEPENDS ${sql_out} ${sql_migration_11} ${sql_migration_12} ${sql_migration_13} ${sql_migration_14})
8788
add_dependencies(clickhouse_fdw clickhouse_fdw_sql)
8889

8990
#------------------------------------------------------------------------------
@@ -94,6 +95,7 @@ set (install_files
9495
"${sql_migration_11}"
9596
"${sql_migration_12}"
9697
"${sql_migration_13}"
98+
"${sql_migration_14}"
9799
"${CMAKE_SOURCE_DIR}/src/clickhouse_fdw.control"
98100
)
99101

src/clickhouse_fdw.control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
comment = 'foreign-data wrapper for remote ClickHouse servers'
2-
default_version = '1.3'
2+
default_version = '1.4'
33
module_pathname = '$libdir/clickhouse_fdw'
44
relocatable = true

src/sql/clickhouse_fdw--1.3--1.4.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP FUNCTION chfdw_install_adjust_functions();

tests/expected/engines.out

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
CREATE EXTENSION clickhouse_fdw;
2-
CREATE EXTENSION istore;
32
CREATE SERVER loopback FOREIGN DATA WRAPPER clickhouse_fdw OPTIONS(dbname 'regression');
43
CREATE USER MAPPING FOR CURRENT_USER SERVER loopback;
54
SELECT clickhousedb_raw_query('drop database if exists regression');
@@ -223,104 +222,6 @@ SELECT a, sum(b) FROM t2 GROUP BY a ORDER BY a;
223222
9 | 540
224223
(10 rows)
225224

226-
/* istore tests */
227-
ALTER TABLE t3_aggr ALTER COLUMN b SET DATA TYPE istore;
228-
SELECT sum(b) FROM t3_aggr;
229-
sum
230-
----------------------------------------------------------------------------------------------------------------
231-
"1"=>"110", "2"=>"10", "3"=>"10", "4"=>"10", "5"=>"10", "6"=>"10", "7"=>"10", "8"=>"10", "9"=>"10", "10"=>"10"
232-
(1 row)
233-
234-
EXPLAIN (VERBOSE, COSTS OFF) SELECT sum(b) FROM t3_aggr;
235-
QUERY PLAN
236-
-------------------------------------------------------------
237-
Foreign Scan
238-
Output: (sum(b))
239-
Relations: Aggregate on (t3_aggr)
240-
Remote SQL: SELECT sumMapMerge(b) FROM regression.t3_aggr
241-
(4 rows)
242-
243-
EXPLAIN (VERBOSE, COSTS OFF) SELECT a, sum(accumulate(b)) FROM t3_aggr GROUP BY a;
244-
QUERY PLAN
245-
-------------------------------------------------------------------------------------------------------------------------------------------------------------
246-
Foreign Scan
247-
Output: a, (sum(accumulate(b)))
248-
Relations: Aggregate on (t3_aggr)
249-
Remote SQL: SELECT a, sumMap((mapFill((finalizeAggregation(b) as _tmp1).1, _tmp1.2) as _tmp3).1, arrayCumSum(_tmp3.2)) FROM regression.t3_aggr GROUP BY a
250-
(4 rows)
251-
252-
EXPLAIN (VERBOSE, COSTS OFF) SELECT a, sum(sum_up(b)) FROM t3_aggr GROUP BY a;
253-
QUERY PLAN
254-
---------------------------------------------------------------------------------------------------------------
255-
Foreign Scan
256-
Output: a, (sum(sum_up(b)))
257-
Relations: Aggregate on (t3_aggr)
258-
Remote SQL: SELECT a, sum(arraySum((finalizeAggregation(b) as _tmp1).2)) FROM regression.t3_aggr GROUP BY a
259-
(4 rows)
260-
261-
SELECT a, sum(sum_up(b)) FROM t3_aggr GROUP BY a;
262-
a | sum
263-
---+-----
264-
0 | 20
265-
4 | 20
266-
3 | 20
267-
2 | 20
268-
5 | 20
269-
1 | 20
270-
6 | 20
271-
7 | 20
272-
9 | 20
273-
8 | 20
274-
(10 rows)
275-
276-
EXPLAIN (VERBOSE, COSTS OFF) SELECT a, sum(sum_up(b, 5)) FROM t3_aggr GROUP BY a;
277-
QUERY PLAN
278-
--------------------------------------------------------------------------------------------------------------------------------------------------------
279-
Foreign Scan
280-
Output: a, (sum(sum_up(b, 5)))
281-
Relations: Aggregate on (t3_aggr)
282-
Remote SQL: SELECT a, sum(arraySum(arrayFilter((v, k) -> k <= (5),(finalizeAggregation(b) as _tmp1).2, _tmp1.1))) FROM regression.t3_aggr GROUP BY a
283-
(4 rows)
284-
285-
SELECT a, sum(sum_up(b, 5)) FROM t3_aggr GROUP BY a;
286-
a | sum
287-
---+-----
288-
0 | 20
289-
4 | 20
290-
3 | 20
291-
2 | 20
292-
5 | 10
293-
1 | 20
294-
6 | 10
295-
7 | 10
296-
9 | 10
297-
8 | 10
298-
(10 rows)
299-
300-
EXPLAIN (VERBOSE, COSTS OFF) SELECT a, sum(b->1) FROM t3_aggr GROUP BY a;
301-
QUERY PLAN
302-
---------------------------------------------------------------------------------------------------------------------------------------
303-
Foreign Scan
304-
Output: a, (sum((b -> 1)))
305-
Relations: Aggregate on (t3_aggr)
306-
Remote SQL: SELECT a, sum(((finalizeAggregation(b) as _tmp1).2)[nullif(indexOf(_tmp1.1, 1), 0)]) FROM regression.t3_aggr GROUP BY a
307-
(4 rows)
308-
309-
SELECT a, sum(b->1) FROM t3_aggr GROUP BY a;
310-
a | sum
311-
---+-----
312-
0 | 20
313-
4 | 10
314-
3 | 10
315-
2 | 10
316-
5 | 10
317-
1 | 10
318-
6 | 10
319-
7 | 10
320-
9 | 10
321-
8 | 10
322-
(10 rows)
323-
324225
DROP USER MAPPING FOR CURRENT_USER SERVER loopback;
325226
SELECT clickhousedb_raw_query('DROP DATABASE regression');
326227
clickhousedb_raw_query
@@ -337,4 +238,3 @@ drop cascades to foreign table t2
337238
drop cascades to foreign table t3
338239
drop cascades to foreign table t3_aggr
339240
drop cascades to foreign table t4
340-
DROP EXTENSION IF EXISTS istore CASCADE;

0 commit comments

Comments
 (0)