Skip to content

Commit e1cc223

Browse files
committed
Post merge corrections and modifications
On branch master_PG12 modified the following files - modified: src/backend/executor/cypher_set.c modified: src/backend/parser/cypher_clause.c modified: src/backend/utils/adt/agtype.c modified: src/backend/utils/adt/graphid.c modified: age--1.3.0.sql modified: regress/expected/catalog.out modified: regress/sql/catalog.sql modified: src/backend/nodes/cypher_readfuncs.c modified: src/include/nodes/cypher_nodes.h These files were modified from specifying PG12 to specifying the master. Mostly related to the CI flow - modified: .github/workflows/installcheck.yaml modified: META.json modified: drivers/docker-compose.yml modified: drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java
1 parent cdbd533 commit e1cc223

File tree

13 files changed

+57
-61
lines changed

13 files changed

+57
-61
lines changed

.github/workflows/installcheck.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@ name: Build / Regression
22

33
on:
44
push:
5-
branches: [ 'master', 'PG11' ]
5+
branches: [ 'master', 'PG12' ]
66
pull_request:
7-
branches: [ 'master', 'PG11' ]
7+
branches: [ 'master', 'PG12' ]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Get latest commit id of PostgreSQL 11
14+
- name: Get latest commit id of PostgreSQL 12
1515
run: |
16-
echo "PG_COMMIT_HASH=$(git ls-remote git://git.postgresql.org/git/postgresql.git refs/heads/REL_11_STABLE | awk '{print $1}')" >> $GITHUB_ENV
16+
echo "PG_COMMIT_HASH=$(git ls-remote git://git.postgresql.org/git/postgresql.git refs/heads/REL_12_STABLE | awk '{print $1}')" >> $GITHUB_ENV
1717
18-
- name: Cache PostgreSQL 11
18+
- name: Cache PostgreSQL 12
1919
uses: actions/cache@v3
20-
id: pg11cache
20+
id: pg12cache
2121
with:
22-
path: ~/pg11
23-
key: ${{ runner.os }}-v1-pg11-${{ env.PG_COMMIT_HASH }}
22+
path: ~/pg12
23+
key: ${{ runner.os }}-v1-pg12-${{ env.PG_COMMIT_HASH }}
2424

25-
- name: Install PostgreSQL 11
26-
if: steps.pg11cache.outputs.cache-hit != 'true'
25+
- name: Install PostgreSQL 12
26+
if: steps.pg12cache.outputs.cache-hit != 'true'
2727
run: |
28-
git clone --depth 1 --branch REL_11_STABLE git://git.postgresql.org/git/postgresql.git ~/pg11source
29-
cd ~/pg11source
30-
./configure --prefix=$HOME/pg11 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
28+
git clone --depth 1 --branch REL_12_STABLE git://git.postgresql.org/git/postgresql.git ~/pg12source
29+
cd ~/pg12source
30+
./configure --prefix=$HOME/pg12 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
3131
make install -j$(nproc) > /dev/null
3232
3333
- uses: actions/checkout@v3
3434

3535
- name: Build
3636
id: build
3737
run: |
38-
make PG_CONFIG=$HOME/pg11/bin/pg_config install -j$(nproc)
38+
make PG_CONFIG=$HOME/pg12/bin/pg_config install -j$(nproc)
3939
4040
- name: Regression tests
4141
id: regression_tests
4242
run: |
43-
make PG_CONFIG=$HOME/pg11/bin/pg_config installcheck
43+
make PG_CONFIG=$HOME/pg12/bin/pg_config installcheck
4444
continue-on-error: true
45-
45+
4646
- name: Dump regression test errors
4747
if: steps.regression_tests.outcome != 'success'
4848
run: |

META.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"name": "ApacheAGE",
33
"abstract": "Apache AGE is a PostgreSQL Extension that provides graph database functionality",
44
"description": "Apache AGE is a PostgreSQL Extension that provides graph database functionality. AGE is an acronym for A Graph Extension, and is inspired by Bitnine's fork of PostgreSQL 10, AgensGraph, which is a multi-model database. The goal of the project is to create single storage that can handle both relational and graph model data so that users can use standard ANSI SQL along with openCypher, the Graph query language. A graph consists of a set of vertices (also called nodes) and edges, where each individual vertex and edge possesses a map of properties. A vertex is the basic object of a graph, that can exist independently of everything else in the graph. An edge creates a directed connection between two vertices. A graph database is simply composed of vertices and edges. This type of database is useful when the meaning is in the relationships between the data. Relational databases can easily handle direct relationships, but indirect relationships are more difficult to deal with in relational databases. A graph database stores relationship information as a first-class entity. Apache AGE gives you the best of both worlds, simultaneously.",
5-
"version": "1.1.0",
5+
"version": "1.3.0",
66
"maintainer": [
77
"users@age.apache.org"
88
],
99
"license": "apache_2_0",
1010
"provides": {
1111
"ApacheAGE": {
1212
"abstract": "Apache AGE is a PostgreSQL Extension that provides graph database functionality",
13-
"file": "age--1.1.0.sql",
13+
"file": "age--1.3.0.sql",
1414
"docfile": "README.md",
15-
"version": "1.1.0"
15+
"version": "1.3.0"
1616
}
1717
},
1818
"prereqs": {
@@ -23,7 +23,7 @@
2323
}
2424
},
2525
"resources": {
26-
"homepage": "https://github.com/apache/age/tree/AGE_PG12.1.0_ALPHA",
26+
"homepage": "https://github.com/apache/age/tree/master",
2727
"bugtracker": {
2828
"web": "https://github.com/apache/age/issues"
2929
},

age--1.3.0.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
-- catalog tables
2525
--
2626

27-
2827
CREATE TABLE ag_graph (
2928
graphid oid NOT NULL,
3029
name name NOT NULL,
@@ -48,7 +47,6 @@ CREATE DOMAIN label_id AS int NOT NULL CHECK (VALUE > 0 AND VALUE <= 65535);
4847
CREATE DOMAIN label_kind AS "char" NOT NULL CHECK (VALUE = 'v' OR VALUE = 'e');
4948

5049
CREATE TABLE ag_label (
51-
5250
name name NOT NULL,
5351
graph oid NOT NULL,
5452
id label_id,

drivers/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "3.3"
22
services:
33
db:
4-
image: apache/age:PG12_latest
4+
image: apache/age:${TAG}
55
environment:
66
- POSTGRES_USER=postgres
77
- POSTGRES_PASSWORD=agens

drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void beforeAll() throws Exception {
5656
imageTag = "latest";
5757
}
5858
agensGraphContainer = new GenericContainer<>(DockerImageName
59-
.parse("apache/age:PG12_latest"))
59+
.parse("apache/age:" + imageTag))
6060
.withEnv("POSTGRES_PASSWORD", CORRECT_DB_PASSWORDS)
6161
.withExposedPorts(5432);
6262
agensGraphContainer.start();

regress/expected/catalog.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ NOTICE: graph "graph" has been created
2828

2929
(1 row)
3030

31-
SELECT * FROM ag_graph WHERE name = 'graph';
32-
graphid | name | namespace
33-
---------+-------+-----------
34-
17639 | graph | graph
31+
SELECT name, namespace FROM ag_graph WHERE name = 'graph';
32+
name | namespace
33+
-------+-----------
34+
graph | graph
3535
(1 row)
3636

3737
-- create a label to test drop_label()

regress/sql/catalog.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SET search_path TO ag_catalog;
2525
--
2626

2727
SELECT create_graph('graph');
28-
SELECT * FROM ag_graph WHERE name = 'graph';
28+
SELECT name, namespace FROM ag_graph WHERE name = 'graph';
2929

3030
-- create a label to test drop_label()
3131
SELECT * FROM cypher('graph', $$CREATE (:l)$$) AS r(a agtype);

src/backend/executor/cypher_set.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ static HeapTuple update_entity_tuple(ResultRelInfo *resultRelInfo,
139139

140140
result = table_tuple_update(resultRelInfo->ri_RelationDesc,
141141
&tuple->t_self, elemTupleSlot,
142-
cid,
143-
//estate->es_output_cid,
144-
estate->es_snapshot,// NULL,
142+
cid, estate->es_snapshot,
145143
estate->es_crosscheck_snapshot,
146144
true /* wait for commit */ ,
147145
&hufd, &lockmode, &update_indexes);

src/backend/nodes/cypher_readfuncs.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ void read_cypher_create_target_nodes(struct ExtensibleNode *node)
186186
READ_LOCALS(cypher_create_target_nodes);
187187

188188
READ_NODE_FIELD(paths);
189-
READ_INT_FIELD(flags);
190-
READ_INT_FIELD(graph_oid);
189+
READ_UINT_FIELD(flags);
190+
READ_UINT_FIELD(graph_oid);
191191
}
192192

193193
/*
@@ -212,7 +212,7 @@ void read_cypher_target_node(struct ExtensibleNode *node)
212212
READ_LOCALS(cypher_target_node);
213213

214214
READ_CHAR_FIELD(type);
215-
READ_INT_FIELD(flags);
215+
READ_UINT_FIELD(flags);
216216
READ_ENUM_FIELD(dir, cypher_rel_dir);
217217
READ_NODE_FIELD(id_expr);
218218
READ_NODE_FIELD(id_expr_state);
@@ -236,7 +236,7 @@ void read_cypher_update_information(struct ExtensibleNode *node)
236236
READ_LOCALS(cypher_update_information);
237237

238238
READ_NODE_FIELD(set_items);
239-
READ_INT_FIELD(flags);
239+
READ_UINT_FIELD(flags);
240240
READ_INT_FIELD(tuple_position);
241241
READ_STRING_FIELD(graph_name);
242242
READ_STRING_FIELD(clause_name);
@@ -268,9 +268,9 @@ void read_cypher_delete_information(struct ExtensibleNode *node)
268268
READ_LOCALS(cypher_delete_information);
269269

270270
READ_NODE_FIELD(delete_items);
271-
READ_INT_FIELD(flags);
271+
READ_UINT_FIELD(flags);
272272
READ_STRING_FIELD(graph_name);
273-
READ_INT_FIELD(graph_oid);
273+
READ_UINT_FIELD(graph_oid);
274274
READ_BOOL_FIELD(detach);
275275
}
276276

@@ -294,7 +294,7 @@ void read_cypher_merge_information(struct ExtensibleNode *node)
294294
{
295295
READ_LOCALS(cypher_merge_information);
296296

297-
READ_INT_FIELD(flags);
297+
READ_UINT_FIELD(flags);
298298
READ_UINT_FIELD(graph_oid);
299299
READ_INT_FIELD(merge_function_attr);
300300
READ_NODE_FIELD(path);

src/backend/parser/cypher_clause.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,15 @@ static cypher_target_node *get_referenced_variable(ParseState *pstate,
279279

280280
//call...[yield]
281281
static Query *transform_cypher_call_stmt(cypher_parsestate *cpstate,
282-
cypher_clause *clause);
282+
cypher_clause *clause);
283283
static Query *transform_cypher_call_subquery(cypher_parsestate *cpstate,
284-
cypher_clause *clause);
284+
cypher_clause *clause);
285285

286286
//call...[yield]
287287
static Query *transform_cypher_call_stmt(cypher_parsestate *cpstate,
288-
cypher_clause *clause);
288+
cypher_clause *clause);
289289
static Query *transform_cypher_call_subquery(cypher_parsestate *cpstate,
290-
cypher_clause *clause);
290+
cypher_clause *clause);
291291

292292
// transform
293293
#define PREV_CYPHER_CLAUSE_ALIAS AGE_DEFAULT_ALIAS_PREFIX"previous_cypher_clause"

0 commit comments

Comments
 (0)