This is an automated email from the ASF dual-hosted git repository.
jgemignani pushed a commit to branch PG12
in repository https://gitbox.apache.org/repos/asf/age.git
The following commit(s) were added to refs/heads/PG12 by this push:
new d65104e8 Big endian support for PG 12 (#1898)
d65104e8 is described below
commit d65104e8f92171f213b44f69ee105af9b16c9bf1
Author: Christoph Berg <[email protected]>
AuthorDate: Tue May 28 19:53:43 2024 +0200
Big endian support for PG 12 (#1898)
* Order some regression tests for stability on big-endian
On Debian's s390x architecture, some regression tests were failing
because the result set was reordered. Fix by attaching ORDER BY in
problematic cases.
* Move agtype_hash_cmp tests to separate file
Output of the agtype_hash_cmp function varies depending on the machine
endianness. Move tests to a separate file and supply little-endian and
big-endian output expected files.
---
Makefile | 1 +
regress/expected/agtype.out | 163 ----------------------------
regress/expected/agtype_hash_cmp.out | 187 +++++++++++++++++++++++++++++++++
regress/expected/agtype_hash_cmp_1.out | 187 +++++++++++++++++++++++++++++++++
regress/expected/cypher_match.out | 6 +-
regress/sql/agtype.sql | 37 -------
regress/sql/agtype_hash_cmp.sql | 62 +++++++++++
regress/sql/cypher_match.sql | 4 +-
8 files changed, 442 insertions(+), 205 deletions(-)
diff --git a/Makefile b/Makefile
index 1b273630..9d2bc253 100644
--- a/Makefile
+++ b/Makefile
@@ -88,6 +88,7 @@ DATA_built = $(age_sql)
REGRESS = scan \
graphid \
agtype \
+ agtype_hash_cmp \
catalog \
cypher \
expr \
diff --git a/regress/expected/agtype.out b/regress/expected/agtype.out
index b3750bcc..d4a577c0 100644
--- a/regress/expected/agtype.out
+++ b/regress/expected/agtype.out
@@ -3577,169 +3577,6 @@ SELECT
agtype_string_match_contains('"abcdefghijklmnopqrstuvwxyz"', '"hijl"');
false
(1 row)
---Agtype Hash Comparison Function
-SELECT agtype_hash_cmp(NULL);
- agtype_hash_cmp
------------------
- 0
-(1 row)
-
-SELECT agtype_hash_cmp('1'::agtype);
- agtype_hash_cmp
------------------
- -123017199
-(1 row)
-
-SELECT agtype_hash_cmp('1.0'::agtype);
- agtype_hash_cmp
------------------
- 614780178
-(1 row)
-
-SELECT agtype_hash_cmp('"1"'::agtype);
- agtype_hash_cmp
------------------
- -888576106
-(1 row)
-
-SELECT agtype_hash_cmp('[1]'::agtype);
- agtype_hash_cmp
------------------
- 434414509
-(1 row)
-
-SELECT agtype_hash_cmp('[1, 1]'::agtype);
- agtype_hash_cmp
------------------
- -1551022880
-(1 row)
-
-SELECT agtype_hash_cmp('[1, 1, 1]'::agtype);
- agtype_hash_cmp
------------------
- -3900769
-(1 row)
-
-SELECT agtype_hash_cmp('[1, 1, 1, 1]'::agtype);
- agtype_hash_cmp
------------------
- 1756986519
-(1 row)
-
-SELECT agtype_hash_cmp('[1, 1, 1, 1, 1]'::agtype);
- agtype_hash_cmp
------------------
- -47741579
-(1 row)
-
-SELECT agtype_hash_cmp('[[1]]'::agtype);
- agtype_hash_cmp
------------------
- 878744030
-(1 row)
-
-SELECT agtype_hash_cmp('[[1, 1]]'::agtype);
- agtype_hash_cmp
------------------
- -1254522284
-(1 row)
-
-SELECT agtype_hash_cmp('[[1], 1]'::agtype);
- agtype_hash_cmp
------------------
- -1005036
-(1 row)
-
-SELECT agtype_hash_cmp('[1543872]'::agtype);
- agtype_hash_cmp
------------------
- -1925093371
-(1 row)
-
-SELECT agtype_hash_cmp('[1, "abcde", 2.0]'::agtype);
- agtype_hash_cmp
------------------
- -1128310748
-(1 row)
-
-SELECT agtype_hash_cmp(agtype_in('null'));
- agtype_hash_cmp
------------------
- -505290271
-(1 row)
-
-SELECT agtype_hash_cmp(agtype_in('[null]'));
- agtype_hash_cmp
------------------
- 505290241
-(1 row)
-
-SELECT agtype_hash_cmp(agtype_in('[null, null]'));
- agtype_hash_cmp
------------------
- 3
-(1 row)
-
-SELECT agtype_hash_cmp(agtype_in('[null, null, null]'));
- agtype_hash_cmp
------------------
- 2021160967
-(1 row)
-
-SELECT agtype_hash_cmp(agtype_in('[null, null, null, null]'));
- agtype_hash_cmp
------------------
- 15
-(1 row)
-
-SELECT agtype_hash_cmp(agtype_in('[null, null, null, null, null]'));
- agtype_hash_cmp
------------------
- -505290721
-(1 row)
-
-SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}'::agtype);
- agtype_hash_cmp
------------------
- 1116453668
-(1 row)
-
-SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}::vertex'::agtype);
- agtype_hash_cmp
------------------
- 1848106598
-(1 row)
-
-SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}'::agtype);
- agtype_hash_cmp
------------------
- 1064722414
-(1 row)
-
-SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge'::agtype);
- agtype_hash_cmp
------------------
- -1790838958
-(1 row)
-
-SELECT agtype_hash_cmp('
- [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
- {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
- {"id":5, "label":"vlabel", "properties":{}}::vertex]'::agtype);
- agtype_hash_cmp
------------------
- -231467898
-(1 row)
-
-SELECT agtype_hash_cmp('
- [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
- {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
- {"id":5, "label":"vlabel", "properties":{}}::vertex]::path'::agtype);
- agtype_hash_cmp
------------------
- 843330291
-(1 row)
-
--Agtype BTree Comparison Function
SELECT agtype_btree_cmp('1'::agtype, '1'::agtype);
agtype_btree_cmp
diff --git a/regress/expected/agtype_hash_cmp.out
b/regress/expected/agtype_hash_cmp.out
new file mode 100644
index 00000000..390e8d17
--- /dev/null
+++ b/regress/expected/agtype_hash_cmp.out
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+--
+-- AGTYPE data type regression tests
+--
+SET search_path TO ag_catalog;
+-- Agtype Hash Comparison Function
+-- Result value varies depending on architecture endianness.
+-- Little endian output is in agtype_hash_cmp.out; big endian in
agtype_hash_cmp_1.out.
+SELECT agtype_hash_cmp(NULL);
+ agtype_hash_cmp
+-----------------
+ 0
+(1 row)
+
+SELECT agtype_hash_cmp('1'::agtype);
+ agtype_hash_cmp
+-----------------
+ -123017199
+(1 row)
+
+SELECT agtype_hash_cmp('1.0'::agtype);
+ agtype_hash_cmp
+-----------------
+ 614780178
+(1 row)
+
+SELECT agtype_hash_cmp('"1"'::agtype);
+ agtype_hash_cmp
+-----------------
+ -888576106
+(1 row)
+
+SELECT agtype_hash_cmp('[1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ 434414509
+(1 row)
+
+SELECT agtype_hash_cmp('[1, 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1551022880
+(1 row)
+
+SELECT agtype_hash_cmp('[1, 1, 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -3900769
+(1 row)
+
+SELECT agtype_hash_cmp('[1, 1, 1, 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ 1756986519
+(1 row)
+
+SELECT agtype_hash_cmp('[1, 1, 1, 1, 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -47741579
+(1 row)
+
+SELECT agtype_hash_cmp('[[1]]'::agtype);
+ agtype_hash_cmp
+-----------------
+ 878744030
+(1 row)
+
+SELECT agtype_hash_cmp('[[1, 1]]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1254522284
+(1 row)
+
+SELECT agtype_hash_cmp('[[1], 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1005036
+(1 row)
+
+SELECT agtype_hash_cmp('[1543872]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1925093371
+(1 row)
+
+SELECT agtype_hash_cmp('[1, "abcde", 2.0]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1128310748
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('null'));
+ agtype_hash_cmp
+-----------------
+ -505290271
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null]'));
+ agtype_hash_cmp
+-----------------
+ 505290241
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null, null]'));
+ agtype_hash_cmp
+-----------------
+ 3
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null, null, null]'));
+ agtype_hash_cmp
+-----------------
+ 2021160967
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null, null, null, null]'));
+ agtype_hash_cmp
+-----------------
+ 15
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null, null, null, null, null]'));
+ agtype_hash_cmp
+-----------------
+ -505290721
+(1 row)
+
+SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}'::agtype);
+ agtype_hash_cmp
+-----------------
+ 1116453668
+(1 row)
+
+SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}::vertex'::agtype);
+ agtype_hash_cmp
+-----------------
+ 1848106598
+(1 row)
+
+SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}'::agtype);
+ agtype_hash_cmp
+-----------------
+ 1064722414
+(1 row)
+
+SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1790838958
+(1 row)
+
+SELECT agtype_hash_cmp('
+ [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
+ {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
+ {"id":5, "label":"vlabel", "properties":{}}::vertex]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -231467898
+(1 row)
+
+SELECT agtype_hash_cmp('
+ [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
+ {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
+ {"id":5, "label":"vlabel", "properties":{}}::vertex]::path'::agtype);
+ agtype_hash_cmp
+-----------------
+ 843330291
+(1 row)
+
diff --git a/regress/expected/agtype_hash_cmp_1.out
b/regress/expected/agtype_hash_cmp_1.out
new file mode 100644
index 00000000..07566c85
--- /dev/null
+++ b/regress/expected/agtype_hash_cmp_1.out
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+--
+-- AGTYPE data type regression tests
+--
+SET search_path TO ag_catalog;
+-- Agtype Hash Comparison Function
+-- Result value varies depending on architecture endianness.
+-- Little endian output is in agtype_hash_cmp.out; big endian in
agtype_hash_cmp_1.out.
+SELECT agtype_hash_cmp(NULL);
+ agtype_hash_cmp
+-----------------
+ 0
+(1 row)
+
+SELECT agtype_hash_cmp('1'::agtype);
+ agtype_hash_cmp
+-----------------
+ -123017199
+(1 row)
+
+SELECT agtype_hash_cmp('1.0'::agtype);
+ agtype_hash_cmp
+-----------------
+ 1437092844
+(1 row)
+
+SELECT agtype_hash_cmp('"1"'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1434266898
+(1 row)
+
+SELECT agtype_hash_cmp('[1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ 434414509
+(1 row)
+
+SELECT agtype_hash_cmp('[1, 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1551022880
+(1 row)
+
+SELECT agtype_hash_cmp('[1, 1, 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -3900769
+(1 row)
+
+SELECT agtype_hash_cmp('[1, 1, 1, 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ 1756986519
+(1 row)
+
+SELECT agtype_hash_cmp('[1, 1, 1, 1, 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -47741579
+(1 row)
+
+SELECT agtype_hash_cmp('[[1]]'::agtype);
+ agtype_hash_cmp
+-----------------
+ 878744030
+(1 row)
+
+SELECT agtype_hash_cmp('[[1, 1]]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1254522284
+(1 row)
+
+SELECT agtype_hash_cmp('[[1], 1]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1005036
+(1 row)
+
+SELECT agtype_hash_cmp('[1543872]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1925093371
+(1 row)
+
+SELECT agtype_hash_cmp('[1, "abcde", 2.0]'::agtype);
+ agtype_hash_cmp
+-----------------
+ 826120111
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('null'));
+ agtype_hash_cmp
+-----------------
+ -505290271
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null]'));
+ agtype_hash_cmp
+-----------------
+ 505290241
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null, null]'));
+ agtype_hash_cmp
+-----------------
+ 3
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null, null, null]'));
+ agtype_hash_cmp
+-----------------
+ 2021160967
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null, null, null, null]'));
+ agtype_hash_cmp
+-----------------
+ 15
+(1 row)
+
+SELECT agtype_hash_cmp(agtype_in('[null, null, null, null, null]'));
+ agtype_hash_cmp
+-----------------
+ -505290721
+(1 row)
+
+SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}'::agtype);
+ agtype_hash_cmp
+-----------------
+ -947461933
+(1 row)
+
+SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}::vertex'::agtype);
+ agtype_hash_cmp
+-----------------
+ 1848106598
+(1 row)
+
+SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}'::agtype);
+ agtype_hash_cmp
+-----------------
+ 1662709842
+(1 row)
+
+SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge'::agtype);
+ agtype_hash_cmp
+-----------------
+ -1790838958
+(1 row)
+
+SELECT agtype_hash_cmp('
+ [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
+ {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
+ {"id":5, "label":"vlabel", "properties":{}}::vertex]'::agtype);
+ agtype_hash_cmp
+-----------------
+ -231467898
+(1 row)
+
+SELECT agtype_hash_cmp('
+ [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
+ {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
+ {"id":5, "label":"vlabel", "properties":{}}::vertex]::path'::agtype);
+ agtype_hash_cmp
+-----------------
+ 843330291
+(1 row)
+
diff --git a/regress/expected/cypher_match.out
b/regress/expected/cypher_match.out
index caa8ace0..fc5bd229 100644
--- a/regress/expected/cypher_match.out
+++ b/regress/expected/cypher_match.out
@@ -1520,13 +1520,13 @@ NOTICE: graph "for_isEmpty" has been dropped
SELECT * FROM cypher('cypher_match', $$
MATCH (u)
RETURN DISTINCT u.id
-$$) AS (i agtype);
+$$) AS (i agtype) ORDER BY i;
i
-----------
-
"end"
"initial"
"middle"
+
(4 rows)
SELECT * FROM cypher('cypher_match', $$
@@ -1556,7 +1556,7 @@ $$) AS (i agtype);
SELECT * FROM cypher('cypher_match', $$
MATCH p=(:duplicate)-[]-(:other_v)
RETURN DISTINCT p
-$$) AS (i agtype);
+$$) AS (i agtype) ORDER BY i;
i
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[{"id": 3377699720527873, "label": "duplicate", "properties": {}}::vertex,
{"id": 3659174697238529, "label": "dup_edge", "end_id": 3940649673949185,
"start_id": 3377699720527873, "properties": {"id": 1}}::edge, {"id":
3940649673949185, "label": "other_v", "properties": {}}::vertex]::path
diff --git a/regress/sql/agtype.sql b/regress/sql/agtype.sql
index 9e8d44e6..016f457f 100644
--- a/regress/sql/agtype.sql
+++ b/regress/sql/agtype.sql
@@ -999,43 +999,6 @@ SELECT
agtype_string_match_starts_with('"abcdefghijklmnopqrstuvwxyz"', '"bcde"')
SELECT agtype_string_match_ends_with('"abcdefghijklmnopqrstuvwxyz"', '"vwxy"');
SELECT agtype_string_match_contains('"abcdefghijklmnopqrstuvwxyz"', '"hijl"');
---Agtype Hash Comparison Function
-SELECT agtype_hash_cmp(NULL);
-SELECT agtype_hash_cmp('1'::agtype);
-SELECT agtype_hash_cmp('1.0'::agtype);
-SELECT agtype_hash_cmp('"1"'::agtype);
-SELECT agtype_hash_cmp('[1]'::agtype);
-SELECT agtype_hash_cmp('[1, 1]'::agtype);
-SELECT agtype_hash_cmp('[1, 1, 1]'::agtype);
-SELECT agtype_hash_cmp('[1, 1, 1, 1]'::agtype);
-SELECT agtype_hash_cmp('[1, 1, 1, 1, 1]'::agtype);
-SELECT agtype_hash_cmp('[[1]]'::agtype);
-SELECT agtype_hash_cmp('[[1, 1]]'::agtype);
-SELECT agtype_hash_cmp('[[1], 1]'::agtype);
-SELECT agtype_hash_cmp('[1543872]'::agtype);
-SELECT agtype_hash_cmp('[1, "abcde", 2.0]'::agtype);
-SELECT agtype_hash_cmp(agtype_in('null'));
-SELECT agtype_hash_cmp(agtype_in('[null]'));
-SELECT agtype_hash_cmp(agtype_in('[null, null]'));
-SELECT agtype_hash_cmp(agtype_in('[null, null, null]'));
-SELECT agtype_hash_cmp(agtype_in('[null, null, null, null]'));
-SELECT agtype_hash_cmp(agtype_in('[null, null, null, null, null]'));
-SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}'::agtype);
-SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}::vertex'::agtype);
-
-SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}'::agtype);
-SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge'::agtype);
-
-SELECT agtype_hash_cmp('
- [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
- {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
- {"id":5, "label":"vlabel", "properties":{}}::vertex]'::agtype);
-
-SELECT agtype_hash_cmp('
- [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
- {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
- {"id":5, "label":"vlabel", "properties":{}}::vertex]::path'::agtype);
-
--Agtype BTree Comparison Function
SELECT agtype_btree_cmp('1'::agtype, '1'::agtype);
SELECT agtype_btree_cmp('1'::agtype, '1.0'::agtype);
diff --git a/regress/sql/agtype_hash_cmp.sql b/regress/sql/agtype_hash_cmp.sql
new file mode 100644
index 00000000..1d53b667
--- /dev/null
+++ b/regress/sql/agtype_hash_cmp.sql
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+--
+-- AGTYPE data type regression tests
+--
+SET search_path TO ag_catalog;
+
+-- Agtype Hash Comparison Function
+-- Result value varies depending on architecture endianness.
+-- Little endian output is in agtype_hash_cmp.out; big endian in
agtype_hash_cmp_1.out.
+SELECT agtype_hash_cmp(NULL);
+SELECT agtype_hash_cmp('1'::agtype);
+SELECT agtype_hash_cmp('1.0'::agtype);
+SELECT agtype_hash_cmp('"1"'::agtype);
+SELECT agtype_hash_cmp('[1]'::agtype);
+SELECT agtype_hash_cmp('[1, 1]'::agtype);
+SELECT agtype_hash_cmp('[1, 1, 1]'::agtype);
+SELECT agtype_hash_cmp('[1, 1, 1, 1]'::agtype);
+SELECT agtype_hash_cmp('[1, 1, 1, 1, 1]'::agtype);
+SELECT agtype_hash_cmp('[[1]]'::agtype);
+SELECT agtype_hash_cmp('[[1, 1]]'::agtype);
+SELECT agtype_hash_cmp('[[1], 1]'::agtype);
+SELECT agtype_hash_cmp('[1543872]'::agtype);
+SELECT agtype_hash_cmp('[1, "abcde", 2.0]'::agtype);
+SELECT agtype_hash_cmp(agtype_in('null'));
+SELECT agtype_hash_cmp(agtype_in('[null]'));
+SELECT agtype_hash_cmp(agtype_in('[null, null]'));
+SELECT agtype_hash_cmp(agtype_in('[null, null, null]'));
+SELECT agtype_hash_cmp(agtype_in('[null, null, null, null]'));
+SELECT agtype_hash_cmp(agtype_in('[null, null, null, null, null]'));
+SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}'::agtype);
+SELECT agtype_hash_cmp('{"id":1, "label":"test",
"properties":{"id":100}}::vertex'::agtype);
+
+SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}'::agtype);
+SELECT agtype_hash_cmp('{"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge'::agtype);
+
+SELECT agtype_hash_cmp('
+ [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
+ {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
+ {"id":5, "label":"vlabel", "properties":{}}::vertex]'::agtype);
+
+SELECT agtype_hash_cmp('
+ [{"id":1, "label":"test", "properties":{"id":100}}::vertex,
+ {"id":2, "start_id":1, "end_id": 3, "label":"elabel",
"properties":{}}::edge,
+ {"id":5, "label":"vlabel", "properties":{}}::vertex]::path'::agtype);
diff --git a/regress/sql/cypher_match.sql b/regress/sql/cypher_match.sql
index facbf3e8..4c18dc2b 100644
--- a/regress/sql/cypher_match.sql
+++ b/regress/sql/cypher_match.sql
@@ -725,7 +725,7 @@ SELECT drop_graph('for_isEmpty', true);
SELECT * FROM cypher('cypher_match', $$
MATCH (u)
RETURN DISTINCT u.id
-$$) AS (i agtype);
+$$) AS (i agtype) ORDER BY i;
SELECT * FROM cypher('cypher_match', $$
CREATE (u:duplicate)-[:dup_edge {id:1 }]->(:other_v)
@@ -744,7 +744,7 @@ $$) AS (i agtype);
SELECT * FROM cypher('cypher_match', $$
MATCH p=(:duplicate)-[]-(:other_v)
RETURN DISTINCT p
-$$) AS (i agtype);
+$$) AS (i agtype) ORDER BY i;
--
-- Limit