This is an automated email from the ASF dual-hosted git repository.
jgemignani pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/age.git
The following commit(s) were added to refs/heads/master by this push:
new ef9e0bd6 Agtype hash cmp (#1893)
ef9e0bd6 is described below
commit ef9e0bd67bb8c342c4f6dd04761e2c4b3a3a5f80
Author: Christoph Berg <[email protected]>
AuthorDate: Thu May 23 19:10:39 2024 +0200
Agtype hash cmp (#1893)
* 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/sql/agtype.sql | 37 -------
regress/sql/agtype_hash_cmp.sql | 62 +++++++++++
6 files changed, 437 insertions(+), 200 deletions(-)
diff --git a/Makefile b/Makefile
index 1224fc2a..400d5a7a 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/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);