Skip to content

Commit

Permalink
Merge pull request #1 from emotionbug/ibrasmaster
Browse files Browse the repository at this point in the history
Fix conflicts, CI Tests for PG12, Format codes.
  • Loading branch information
ibrarahmad authored Mar 4, 2022
2 parents a74677a + d9f6ee9 commit 22fba69
Show file tree
Hide file tree
Showing 120 changed files with 160,661 additions and 7,845 deletions.
17 changes: 8 additions & 9 deletions clang-format.5 → .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
# under the License.

AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: DontAlign
AlignOperands: true
AlignTrailingComments: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
Expand All @@ -45,15 +45,14 @@ BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
BreakStringLiterals: false
ColumnLimit: 79
ColumnLimit: 80
CommentPragmas: ''
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros:
- 'foreach'
IncludeCategories:
IncludeIsMainRegex: '$'
IndentCaseLabels: false
IndentWidth: 4
Expand All @@ -70,9 +69,9 @@ PenaltyBreakString: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: false
SortIncludes: true
SpaceAfterCStyleCast: false
ReflowComments: true
SortIncludes: CaseInsensitive
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/installcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: PG12 Regression

on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Get latest commit id of PostgreSQL 12
run: |
echo "PG_COMMIT_HASH=$(git ls-remote git://git.postgresql.org/git/postgresql.git refs/heads/REL_12_STABLE | awk '{print $1}')" >> $GITHUB_ENV
- name: Cache PostgreSQL 12
uses: actions/cache@v2
id: pg12cache
with:
path: ~/pg12
key: ${{ runner.os }}-v1-pg12-${{ env.PG_COMMIT_HASH }}

- name: Install PostgreSQL 12
if: steps.pg12cache.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --branch REL_12_STABLE git://git.postgresql.org/git/postgresql.git ~/pg12source
cd ~/pg12source
./configure --prefix=$HOME/pg12 CFLAGS="-std=gnu99 -ggdb -O0" --enable-cassert
make install -j$(nproc) > /dev/null
- uses: actions/checkout@v2
- name: Regression
run: |
export PG_CONFIG=$HOME/pg12/bin/pg_config
make -j$(nproc)
make install
make installcheck
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
build.sh
.idea
.deps
.DS_Store
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

33 changes: 25 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ OBJS = src/backend/age.o \
src/backend/commands/graph_commands.o \
src/backend/commands/label_commands.o \
src/backend/executor/cypher_create.o \
src/backend/executor/cypher_merge.o \
src/backend/executor/cypher_set.o \
src/backend/executor/cypher_utils.o \
src/backend/nodes/ag_nodes.o \
Expand All @@ -44,24 +45,28 @@ OBJS = src/backend/age.o \
src/backend/parser/cypher_gram.o \
src/backend/parser/cypher_item.o \
src/backend/parser/cypher_keywords.o \
src/backend/parser/cypher_parse_agg.o \
src/backend/parser/cypher_parse_node.o \
src/backend/parser/cypher_parser.o \
src/backend/utils/adt/age_graphid_ds.o \
src/backend/utils/adt/agtype.o \
src/backend/utils/adt/agtype_ext.o \
src/backend/utils/adt/agtype_ops.o \
src/backend/utils/adt/agtype_parser.o \
src/backend/utils/adt/agtype_util.o \
src/backend/utils/adt/agtype_vle.o \
src/backend/utils/adt/age_global_graph.o \
src/backend/utils/adt/age_vle.o \
src/backend/utils/adt/cypher_funcs.o \
src/backend/utils/adt/ag_float8_supp.o \
src/backend/utils/adt/graphid.o \
src/backend/utils/ag_func.o \
src/backend/utils/cache/ag_cache.o
src/backend/utils/cache/ag_cache.o \
src/backend/utils/load/ag_load_labels.o \
src/backend/utils/load/ag_load_edges.o \
src/backend/utils/load/age_load.o \
src/backend/utils/load/libcsv.o

EXTENSION = age

DATA = age--0.6.0.sql
DATA = age--1.0.0.sql

# sorted in dependency order
REGRESS = scan \
Expand All @@ -72,11 +77,15 @@ REGRESS = scan \
expr \
cypher_create \
cypher_match \
cypher_unwind \
cypher_set \
cypher_remove \
cypher_delete \
cypher_with \
cypher_vle \
cypher_union \
cypher_merge \
age_load \
drop

srcdir=`pwd`
Expand All @@ -85,20 +94,28 @@ ag_regress_dir = $(srcdir)/regress
REGRESS_OPTS = --load-extension=age --inputdir=$(ag_regress_dir) --outputdir=$(ag_regress_dir) --temp-instance=$(ag_regress_dir)/instance --port=61958 --encoding=UTF-8

ag_regress_out = instance/ log/ results/ regression.*
EXTRA_CLEAN = $(addprefix $(ag_regress_dir)/, $(ag_regress_out)) src/backend/parser/cypher_gram.c src/include/parser/cypher_gram_def.h
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

GEN_KEYWORDLIST = $(PERL) -I ./tools/ ./tools/gen_keywordlist.pl
GEN_KEYWORDLIST_DEPS = ./tools/gen_keywordlist.pl tools/PerfectHash.pm

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

PG_CONFIG = pg_config
PG_CONFIG ?= pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)

src/backend/parser/cypher_keywords.o: src/include/parser/cypher_kwlist_d.h

src/include/parser/cypher_kwlist_d.h: src/include/parser/cypher_kwlist.h $(GEN_KEYWORDLIST_DEPS)
$(GEN_KEYWORDLIST) --extern --varname CypherKeyword --output src/include/parser $<

src/include/parser/cypher_gram_def.h: src/backend/parser/cypher_gram.c

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

src/backend/parser/cypher_parser.o: src/backend/parser/cypher_gram.c
src/backend/parser/cypher_keywords.o: src/backend/parser/cypher_gram.c

src/backend/parser/ag_scanner.c: FLEX_NO_BACKUP=yes
src/backend/parser/ag_scanner.c: FLEX_NO_BACKUP=yes
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Apache AGE is:

Powerful -- AGE adds graph database support to the already popular PostgreSQL database: PostgreSQL is used by organizations including Apple, Spotify, and NASA.
Flexible -- AGE allows you to perform openCypher queries, which make complex queries much easier to write.
Intelligent -- AGE allows you to perform graph queries that are the basis for many next level web services such as fraud & intrustion detection, master data management, product recommendations, identity and relationship management, experience personalization, knowledge management and more.
Intelligent -- AGE allows you to perform graph queries that are the basis for many next level web services such as fraud & intrusion detection, master data management, product recommendations, identity and relationship management, experience personalization, knowledge management and more.

## Overview

Expand All @@ -27,7 +27,7 @@ Intelligent -- AGE allows you to perform graph queries that are the basis for ma

## Latest happenings

- Latest Apache AGE release, [Apache AGE 0.6.0 (incubating)](https://github.com/apache/incubator-age/releases/tag/v0.6.0).
- Latest Apache AGE release, [Apache AGE 0.7.0 (incubating)](https://github.com/apache/incubator-age/releases/tag/v0.7.0).
- The latest Apache AGE documentation is now available at [here](https://age.apache.org/docs/master/index.html).
- The roadmap has been updated, please check out the [Apache AGE website](http://age.apache.org/).
- Send all your comments and inquiries to the user mailing list, users@age.apache.org.
Expand Down
40 changes: 33 additions & 7 deletions RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,38 @@
# specific language governing permissions and limitations
# under the License.

Release Notes for Apache AGE release v0.6.0
Release Notes for Apache AGE release v0.7.0

Add VLE SRF (Set Returning Function).
Fix Vertex, Edge, and Path serialization bug (AGE2-307).
Fix CREATE passback bug (AGE2-337).
Fix CREATE transaction block bug (AGE2-345).
Fix parallel build errors.
Fix Travis CI compiler warnings.
Apache AGE 0.7.0 - Release Notes

Refactor and bug fix of DELETE’s usage of currentCommandId.
Add Labels creation functions (issue #115).
Refactor and bug fix of SET’s usage of currentCommandId.
Add regular expression comparisons with ‘~=’.
Add relationships() function.
Add range() function.
Add keys() function.
Update README.
Add labels() function.
Add nodes() function.
Add XOR operator.
Fix Mac OS X compilation (issue #82).
Create issue templates (issue #90).
Fix nodejs driver (issue #104).
Add reverse() function for lists.
Refactor code for CREATE vertex and edge labels (issue #136).
Add AGTYPE parser and driver support to Python and Golang.
Fix incorrect parse tree for EXISTS (issue #141).
Add VLE core to the MATCH clause.
Fix licensing issues in the master branch.
Refactor VLE edge uniqueness.
Add AGTYPE and GRAPHID send and receive functions.
Add precision parameter to round().
Fix SET clause (issue #165).
Add typecasting to int4[].
Updated documentation.
Add new docker file.
Add zero boundary case to VLE.
Add ASF licenses for Python and Golang drivers.
Fix for zero boundary case.
Fix for paths of length one.
44 changes: 36 additions & 8 deletions age--0.6.0.sql → age--1.0.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
--
-- catalog tables
--
CREATE SEQUENCE IF NOT EXISTS ag_catalog._ag_graph_id_seq MINVALUE 1;

CREATE TABLE ag_graph (
id INTEGER PRIMARY KEY DEFAULT nextval('ag_catalog._ag_graph_id_seq'),
name name NOT NULL,
namespace regnamespace NOT NULL
) WITH (OIDS);

CREATE UNIQUE INDEX ag_graph_oid_index ON ag_graph USING btree (oid);
);

CREATE UNIQUE INDEX ag_graph_name_index ON ag_graph USING btree (name);

Expand All @@ -44,13 +44,14 @@ CREATE DOMAIN label_kind AS "char" NOT NULL CHECK (VALUE = 'v' OR VALUE = 'e');

CREATE TABLE ag_label (
name name NOT NULL,
graph oid NOT NULL,
graph INTEGER NOT NULL,
id label_id,
kind label_kind,
relation regclass NOT NULL
) WITH (OIDS);

CREATE UNIQUE INDEX ag_label_oid_index ON ag_label USING btree (oid);
relation regclass NOT NULL,
CONSTRAINT fk_graph_id
FOREIGN KEY(graph)
REFERENCES ag_graph(id)
);

CREATE UNIQUE INDEX ag_label_name_graph_index
ON ag_label
Expand Down Expand Up @@ -108,6 +109,21 @@ RETURNS void
LANGUAGE c
AS 'MODULE_PATHNAME';

CREATE FUNCTION ag_catalog.load_labels_from_file(graph_name name,
label_name name,
file_path text,
id_field_exists bool default true)
RETURNS void
LANGUAGE c
AS 'MODULE_PATHNAME';

CREATE FUNCTION ag_catalog.load_edges_from_file(graph_name name,
label_name name,
file_path text)
RETURNS void
LANGUAGE c
AS 'MODULE_PATHNAME';

--
-- graphid type
--
Expand Down Expand Up @@ -3130,6 +3146,11 @@ RETURNS void
LANGUAGE c
AS 'MODULE_PATHNAME';

CREATE FUNCTION ag_catalog._cypher_merge_clause(internal)
RETURNS void
LANGUAGE c
AS 'MODULE_PATHNAME';

--
-- query functions
--
Expand Down Expand Up @@ -3877,6 +3898,13 @@ STABLE
PARALLEL SAFE
AS 'MODULE_PATHNAME';

CREATE FUNCTION ag_catalog.age_unnest(agtype, block_types boolean = false)
RETURNS SETOF agtype
LANGUAGE c
STABLE
PARALLEL SAFE
AS 'MODULE_PATHNAME';

--
-- End
--
2 changes: 1 addition & 1 deletion age.control
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

default_version = '0.6.0'
default_version = '1.0.0'
comment = 'AGE database extension'
module_pathname = '$libdir/age'

Expand Down
1 change: 0 additions & 1 deletion doc/.gitignore

This file was deleted.

Loading

0 comments on commit 22fba69

Please sign in to comment.