Skip to content

Commit c075703

Browse files
jrgemignanimuhammadshoaibemotionbugIbrar AhmadJoshInnis
authored
Merge branch PG12 (version 1.3.0) into the master branch. (#1015)
Merge PG12 version 1.3.0 into the master branch PR 1015 contains the merge of the branch PG12 (version 1.3.0) into the master branch. This will fold in all of the changes that are specific to the branch PG12 and future branches. As the master branch is already ahead of version 1.3.0, it will also create a master branch that is on PostgreSQL 12 and completely up-to-date. PG11 is already completely up-to-date. Note: Effective as of the merge of this PR, the master branch will be on PostgreSQL 12. * Post merge corrections and modifications On branch master_PG12 modified the following files to correct whitespace, typos, duplicates, and clarity - 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 modified: src/backend/catalog/ag_graph.c modified: src/backend/executor/cypher_create.c modified: src/backend/executor/cypher_merge.c modified: src/backend/utils/adt/graphid.c modified: src/backend/utils/graph_generation.c modified: src/backend/commands/label_commands.c modified: src/backend/parser/cypher_analyze.c modified: src/backend/utils/load/ag_load_edges.c modified: src/backend/utils/load/ag_load_labels.c These files were modified from specifying PG12 specifically to specifying the master. Mostly related to the CI work 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 renamed: .github/workflows/installcheck.yml -> .github/workflows/installcheck.yaml For work specific to PG12 branch and PG11 to 12 - Co-authored-by: John Gemignani <[email protected]> Co-authored-by: Shoaib <[email protected]> Co-authored-by: Alex Kwak <[email protected]> Co-authored-by: Ibrar Ahmad <[email protected]> Co-authored-by: Josh Innis <[email protected]> Co-authored-by: eyab <[email protected]> Co-authored-by: Dehowe Feng <[email protected]> Co-authored-by: jbiz805 <[email protected]> Co-authored-by: Rafsun Masud <[email protected]> Co-authored-by: Utkarsh Kansal <[email protected]> Co-authored-by: Dehowe Feng <[email protected]> Co-authored-by: Muhammad Taha Naveed <[email protected]>
1 parent 88ead70 commit c075703

Some content is hidden

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

89 files changed

+1850
-1371
lines changed

Diff for: .github/workflows/go-driver.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Go Driver Tests
22

33
on:
44
push:
5-
branches: [ "master", "PG11" ]
5+
branches: [ "master", "PG12" ]
66

77
pull_request:
8-
branches: [ "master", "PG11" ]
8+
branches: [ "master", "PG12" ]
99

1010
jobs:
1111
build:
@@ -17,7 +17,7 @@ jobs:
1717
defaults:
1818
run:
1919
working-directory: drivers/golang/age/
20-
20+
2121
steps:
2222
- uses: actions/checkout@v3
2323

@@ -26,17 +26,17 @@ jobs:
2626
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
2727
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
2828
echo "TAG=latest" >> $GITHUB_ENV
29-
elif [[ "$GITHUB_REF" == "refs/heads/PG11" ]]; then
30-
echo "TAG=PG11_latest" >> $GITHUB_ENV
29+
elif [[ "$GITHUB_REF" == "refs/heads/PG12" ]]; then
30+
echo "TAG=PG12_latest" >> $GITHUB_ENV
3131
fi
3232
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
3333
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
3434
echo "TAG=latest" >> $GITHUB_ENV
35-
elif [[ "$GITHUB_BASE_REF" == "PG11" ]]; then
36-
echo "TAG=PG11_latest" >> $GITHUB_ENV
35+
elif [[ "$GITHUB_BASE_REF" == "PG12" ]]; then
36+
echo "TAG=PG12_latest" >> $GITHUB_ENV
3737
fi
3838
fi
39-
39+
4040
- name: Run apache/age docker image
4141
run: |
4242
export TAG=$TAG
@@ -46,12 +46,12 @@ jobs:
4646
uses: actions/setup-go@v3
4747
with:
4848
go-version: ${{ matrix.go-version }}
49-
49+
5050
- name: Generate
5151
run: go generate ./../...
5252

5353
- name: Build
5454
run: go build -v ./...
5555

5656
- name: Test
57-
run: go test . -v
57+
run: go test . -v

Diff for: .github/workflows/installcheck.yaml

+16-16
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: |

Diff for: .github/workflows/jdbc-driver.yaml

+9-10
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@ name: JDBC Driver Tests
22

33
on:
44
push:
5-
branches: [ "master", "PG11" ]
6-
5+
branches: [ "master", "PG12" ]
6+
77
pull_request:
8-
branches: [ "master", "PG11" ]
8+
branches: [ "master", "PG12" ]
99

1010
jobs:
1111
build:
1212
runs-on: ubuntu-latest
13-
1413
defaults:
1514
run:
1615
working-directory: drivers/jdbc
1716

1817
steps:
1918
- uses: actions/checkout@v3
20-
19+
2120
- name: Set up Java
2221
uses: actions/setup-java@v3
2322
with:
@@ -29,18 +28,18 @@ jobs:
2928
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
3029
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
3130
echo "TAG=latest" >> $GITHUB_ENV
32-
elif [[ "$GITHUB_REF" == "refs/heads/PG11" ]]; then
33-
echo "TAG=PG11_latest" >> $GITHUB_ENV
31+
elif [[ "$GITHUB_REF" == "refs/heads/PG12" ]]; then
32+
echo "TAG=PG12_latest" >> $GITHUB_ENV
3433
fi
3534
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
3635
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
3736
echo "TAG=latest" >> $GITHUB_ENV
38-
elif [[ "$GITHUB_BASE_REF" == "PG11" ]]; then
39-
echo "TAG=PG11_latest" >> $GITHUB_ENV
37+
elif [[ "$GITHUB_BASE_REF" == "PG12" ]]; then
38+
echo "TAG=PG12_latest" >> $GITHUB_ENV
4039
fi
4140
fi
4241
4342
- name: Build and Test
4443
run: |
4544
export TAG=$TAG
46-
gradle build
45+
gradle build

Diff for: .github/workflows/nodejs-driver.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Nodejs Driver Tests
22

33
on:
44
push:
5-
branches: [ "master", "PG11" ]
5+
branches: [ "master", "PG12" ]
66

77
pull_request:
8-
branches: [ "master", "PG11" ]
8+
branches: [ "master", "PG12" ]
99

1010
jobs:
1111
build:
@@ -14,26 +14,26 @@ jobs:
1414
defaults:
1515
run:
1616
working-directory: drivers/nodejs/
17-
17+
1818
steps:
1919
- uses: actions/checkout@v3
20-
20+
2121
- name: Set tag based on branch
2222
run: |
2323
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
2424
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
2525
echo "TAG=latest" >> $GITHUB_ENV
26-
elif [[ "$GITHUB_REF" == "refs/heads/PG11" ]]; then
27-
echo "TAG=PG11_latest" >> $GITHUB_ENV
26+
elif [[ "$GITHUB_REF" == "refs/heads/PG12" ]]; then
27+
echo "TAG=PG12_latest" >> $GITHUB_ENV
2828
fi
2929
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
3030
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
3131
echo "TAG=latest" >> $GITHUB_ENV
32-
elif [[ "$GITHUB_BASE_REF" == "PG11" ]]; then
33-
echo "TAG=PG11_latest" >> $GITHUB_ENV
32+
elif [[ "$GITHUB_BASE_REF" == "PG12" ]]; then
33+
echo "TAG=PG12_latest" >> $GITHUB_ENV
3434
fi
3535
fi
36-
36+
3737
- name: Run apache/age docker image
3838
run: |
3939
export TAG=$TAG
@@ -51,4 +51,4 @@ jobs:
5151
run: npm run build
5252

5353
- name: Test
54-
run: npm test
54+
run: npm test

Diff for: .github/workflows/python-driver.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Python Driver Tests
22

33
on:
44
push:
5-
branches: [ "master", "PG11" ]
6-
5+
branches: [ "master", "PG12" ]
6+
77
pull_request:
8-
branches: [ "master", "PG11" ]
8+
branches: [ "master", "PG12" ]
99

1010
jobs:
1111
build:
@@ -14,26 +14,26 @@ jobs:
1414
defaults:
1515
run:
1616
working-directory: drivers/python
17-
17+
1818
steps:
1919
- uses: actions/checkout@v3
20-
20+
2121
- name: Set tag based on branch
2222
run: |
2323
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
2424
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
2525
echo "TAG=latest" >> $GITHUB_ENV
26-
elif [[ "$GITHUB_REF" == "refs/heads/PG11" ]]; then
27-
echo "TAG=PG11_latest" >> $GITHUB_ENV
26+
elif [[ "$GITHUB_REF" == "refs/heads/PG12" ]]; then
27+
echo "TAG=PG12_latest" >> $GITHUB_ENV
2828
fi
2929
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
3030
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
3131
echo "TAG=latest" >> $GITHUB_ENV
32-
elif [[ "$GITHUB_BASE_REF" == "PG11" ]]; then
33-
echo "TAG=PG11_latest" >> $GITHUB_ENV
32+
elif [[ "$GITHUB_BASE_REF" == "PG12" ]]; then
33+
echo "TAG=PG12_latest" >> $GITHUB_ENV
3434
fi
3535
fi
36-
36+
3737
- name: Run apache/age docker image
3838
run: |
3939
export TAG=$TAG

Diff for: .gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
*.o
22
*.so
3-
.gitignore
43
build.sh
54
.idea
65
.deps
76
.DS_Store
87
*.tokens
9-
*.interp
8+
*.interp

Diff for: CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ We strongly recommend you to subscribe the mailing lists, join the Apache AGE Di
2020

2121
## Pull Requests
2222

23-
Changes to AGE source code are proposed, reviewed, and committed via GitHub pull requests (described in Code Convention). Pull requests are a great way to get your ideas into this repository. Anyone can view and comment on active changes here. Reviewing others' changes are a good way to learn how the change process works and gain exposure to activity in various parts of the code. You can help by reviewing the changes, asking questions, or pointing out issues as simple as typos.
23+
Changes to AGE source code are proposed, reviewed, and committed via Github pull requests (described in Code Convention). Pull requests are a great way to get your ideas into this repository. Anyone can view and comment on active changes here. Reviewing others' changes are a good way to learn how the change process works and gain exposure to activity in various parts of the code. You can help by reviewing the changes, asking questions, or pointing out issues as simple as typos.
2424

2525
## Documentation Changes
2626

Diff for: Dockerfile

+5-6
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,17 @@
1616
# limitations under the License.
1717
#
1818

19+
FROM postgres:12
1920

20-
FROM postgres:11-buster
21-
22-
RUN apt-get update
21+
RUN apt-get update
2322
RUN apt-get install --assume-yes --no-install-recommends --no-install-suggests \
2423
bison \
2524
build-essential \
2625
flex \
27-
postgresql-server-dev-11
26+
postgresql-server-dev-12
2827

29-
COPY . /age
30-
RUN cd /age && make install
28+
COPY . /age
29+
RUN cd /age && make install
3130

3231
COPY docker-entrypoint-initdb.d/00-create-extension-age.sql /docker-entrypoint-initdb.d/00-create-extension-age.sql
3332

Diff for: META.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "ApacheAGE",
3+
"abstract": "Apache AGE is a PostgreSQL Extension that provides graph database functionality",
4+
"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.3.0",
6+
"maintainer": [
7+
8+
],
9+
"license": "apache_2_0",
10+
"provides": {
11+
"ApacheAGE": {
12+
"abstract": "Apache AGE is a PostgreSQL Extension that provides graph database functionality",
13+
"file": "age--1.3.0.sql",
14+
"docfile": "README.md",
15+
"version": "1.3.0"
16+
}
17+
},
18+
"prereqs": {
19+
"runtime": {
20+
"requires": {
21+
"PostgreSQL": "12.0.0"
22+
}
23+
}
24+
},
25+
"resources": {
26+
"homepage": "https://github.com/apache/age/tree/master",
27+
"bugtracker": {
28+
"web": "https://github.com/apache/age/issues"
29+
},
30+
"repository": {
31+
"url": "https://github.com/apache/age.git",
32+
"web": "https://github.com/apache/age",
33+
"type": "git"
34+
}
35+
},
36+
"generated_by": "[email protected]",
37+
"meta-spec": {
38+
"version": "1.0.0",
39+
"url": "http://pgxn.org/meta/spec.txt"
40+
},
41+
"tags": [
42+
"graphdb",
43+
"graph-database"
44+
]
45+
}

Diff for: Makefile

+10-2
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,23 @@ ag_regress_dir = $(srcdir)/regress
108108
REGRESS_OPTS = --load-extension=age --inputdir=$(ag_regress_dir) --outputdir=$(ag_regress_dir) --temp-instance=$(ag_regress_dir)/instance --port=61958 --encoding=UTF-8
109109

110110
ag_regress_out = instance/ log/ results/ regression.*
111-
EXTRA_CLEAN = $(addprefix $(ag_regress_dir)/, $(ag_regress_out)) src/backend/parser/cypher_gram.c src/include/parser/cypher_gram_def.h
111+
EXTRA_CLEAN = $(addprefix $(ag_regress_dir)/, $(ag_regress_out)) src/backend/parser/cypher_gram.c src/include/parser/cypher_gram_def.h src/include/parser/cypher_kwlist_d.h
112+
113+
GEN_KEYWORDLIST = $(PERL) -I ./tools/ ./tools/gen_keywordlist.pl
114+
GEN_KEYWORDLIST_DEPS = ./tools/gen_keywordlist.pl tools/PerfectHash.pm
112115

113116
ag_include_dir = $(srcdir)/src/include
114117
PG_CPPFLAGS = -I$(ag_include_dir) -I$(ag_include_dir)/parser
115118

116-
PG_CONFIG = pg_config
119+
PG_CONFIG ?= pg_config
117120
PGXS := $(shell $(PG_CONFIG) --pgxs)
118121
include $(PGXS)
119122

123+
src/backend/parser/cypher_keywords.o: src/include/parser/cypher_kwlist_d.h
124+
125+
src/include/parser/cypher_kwlist_d.h: src/include/parser/cypher_kwlist.h $(GEN_KEYWORDLIST_DEPS)
126+
$(GEN_KEYWORDLIST) --extern --varname CypherKeyword --output src/include/parser $<
127+
120128
src/include/parser/cypher_gram_def.h: src/backend/parser/cypher_gram.c
121129

122130
src/backend/parser/cypher_gram.c: BISONFLAGS += --defines=src/include/parser/cypher_gram_def.h

0 commit comments

Comments
 (0)