You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
148778: geomfn: adjust two tests to work on s390x r=yuzefovich a=yuzefovich
`angleFromCoords` function uses `atan` to compute some geometry functions. s390x system has architecture support for that trigonometric function which can produce slightly different result than when computing via math operations, which resulted in a false positive failure in a couple of tests. This commit teaches those tests to use our custom float comparison function that only checks 15 significant decimal digits.
Fixes: #145985.
Release note: None
148784: logictest: adjust a few of geo tests for s390x r=yuzefovich a=yuzefovich
Similar to other patches, we need to do some rounding for a couple of geo logic tests. This is the case since s390x has architecture support for trigonometric functions which are used when computing `ST_Segmentize` and `ST_Rotate` builtins. Note that the "rounding" is performed via regexp replacement on top of the textual result.
Relatedly, we have a couple of tests that print inverted index keys, and for some shapes / geographies we use s2 library which also uses trigonometric functions. Thus, this commit adjusts those tests to account for the minor differences. This behavior suggests another limitation for heterogeneous clusters - we cannot guarantee to correctly read inverted geo indexes when the SQL pod and the KV / storage node run on different architectures. I don't think there is any concern for "pure" s390x clusters since they will behave consistently within the cluster.
This limitation is filed as #148783.
Fixes: #146001.
Fixes: #146007.
Fixes: #146109.
Release note: None
Co-authored-by: Yahor Yuzefovich <[email protected]>
INSERT INTO c VALUES (1, 'POINT(1.0 1.0)', 'POINT(2.0 2.0)')
37
35
----
38
36
Scan /Table/20/1/10{7-8}
39
37
CPut /Table/107/1/1/0 -> /TUPLE/
40
38
Put /Table/107/2/"B\xfd\x10\x01D\x15@\x80K\xd5\x01?\x91\xdfF\xa2R\x9d9?\x91\xdfF\xa2R\x9d9\x89\x88" -> /BYTES/
41
39
Put /Table/107/3/"B\xfd\x10\x00\x00\x00\x00\x00\x00\x01\x01@\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x89\x88" -> /BYTES/
40
+
41
+
# s390x produces slightly different inverted index key for the linestring (among
42
+
# other shapes) because it has architecture support for trigonometric functions
43
+
# (used by s2 library), so we have different expectations for s390x vs other
44
+
# systems. s390x is the only big endian system we support right now, so we abuse
45
+
# the corresponding option a bit.
46
+
skipif bigendian
47
+
48
+
query T kvtrace
49
+
INSERT INTO c VALUES (2, 'LINESTRING(1.0 1.0, 2.0 2.0)', 'POINT(1.0 1.0)')
50
+
----
42
51
CPut /Table/107/1/2/0 -> /TUPLE/
43
52
Put /Table/107/2/"B\xfd\x10\x01P\x00\x00\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb9?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8a\x88" -> /BYTES/
44
53
Put /Table/107/2/"B\xfd\x10\x03\xff\xff\xfc\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb9?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8a\x88" -> /BYTES/
45
54
Put /Table/107/2/"B\xfd\x10\x05\x00\x00\x00\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb9?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8a\x88" -> /BYTES/
46
55
Put /Table/107/3/"B\xfd\x10\x00\x00\x00\x00\x00\x00\x01\x01?\xf0\x00\x00\x00\x00\x00\x00?\xf0\x00\x00\x00\x00\x00\x00\x8a\x88" -> /BYTES/
47
56
57
+
skipif littleendian
58
+
59
+
query T kvtrace
60
+
INSERT INTO c VALUES (2, 'LINESTRING(1.0 1.0, 2.0 2.0)', 'POINT(1.0 1.0)')
61
+
----
62
+
CPut /Table/107/1/2/0 -> /TUPLE/
63
+
Put /Table/107/2/"B\xfd\x10\x01P\x00\x00\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb8?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8a\x88" -> /BYTES/
64
+
Put /Table/107/2/"B\xfd\x10\x03\xff\xff\xfc\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb8?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8a\x88" -> /BYTES/
65
+
Put /Table/107/2/"B\xfd\x10\x05\x00\x00\x00\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb8?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8a\x88" -> /BYTES/
66
+
Put /Table/107/3/"B\xfd\x10\x00\x00\x00\x00\x00\x00\x01\x01?\xf0\x00\x00\x00\x00\x00\x00?\xf0\x00\x00\x00\x00\x00\x00\x8a\x88" -> /BYTES/
INSERT INTO b VALUES (3, 'POINT(1.0 1.0)', 'POINT(2.0 2.0)')
58
76
----
59
77
CPut /Table/106/1/3/0 -> /TUPLE/
60
78
Put /Table/106/2/"B\xfd\x10\x01D\x15@\x80K\xd5\x01?\x91\xdfF\xa2R\x9d9?\x91\xdfF\xa2R\x9d9\x8b\x88" -> /BYTES/
61
79
Put /Table/106/4/"B\xfd\x10\x00\x00\x00\x00\x00\x00\x01\x01@\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x8b\x88" -> /BYTES/
80
+
81
+
skipif bigendian
82
+
83
+
query T kvtrace
84
+
INSERT INTO b VALUES (4, 'LINESTRING(1.0 1.0, 2.0 2.0)', 'POINT(1.0 1.0)')
85
+
----
62
86
CPut /Table/106/1/4/0 -> /TUPLE/
63
87
Put /Table/106/2/"B\xfd\x10\x01P\x00\x00\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb9?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8c\x88" -> /BYTES/
64
88
Put /Table/106/2/"B\xfd\x10\x03\xff\xff\xfc\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb9?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8c\x88" -> /BYTES/
65
89
Put /Table/106/2/"B\xfd\x10\x05\x00\x00\x00\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb9?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8c\x88" -> /BYTES/
66
90
Put /Table/106/4/"B\xfd\x10\x00\x00\x00\x00\x00\x00\x01\x01?\xf0\x00\x00\x00\x00\x00\x00?\xf0\x00\x00\x00\x00\x00\x00\x8c\x88" -> /BYTES/
67
91
92
+
skipif littleendian
93
+
94
+
query T kvtrace
95
+
INSERT INTO b VALUES (4, 'LINESTRING(1.0 1.0, 2.0 2.0)', 'POINT(1.0 1.0)')
96
+
----
97
+
CPut /Table/106/1/4/0 -> /TUPLE/
98
+
Put /Table/106/2/"B\xfd\x10\x01P\x00\x00\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb8?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8c\x88" -> /BYTES/
99
+
Put /Table/106/2/"B\xfd\x10\x03\xff\xff\xfc\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb8?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8c\x88" -> /BYTES/
100
+
Put /Table/106/2/"B\xfd\x10\x05\x00\x00\x00\x00\x00\x00\x00?\x91\xdfF\xa2R\x9d8?\x91\xdfF\xa2R\x9c\xb8?\xa1\xdfF\xa2R\x9d9?\xa1\xdfF\xa2R\x9dx\x8c\x88" -> /BYTES/
101
+
Put /Table/106/4/"B\xfd\x10\x00\x00\x00\x00\x00\x00\x01\x01?\xf0\x00\x00\x00\x00\x00\x00?\xf0\x00\x00\x00\x00\x00\x00\x8c\x88" -> /BYTES/
0 commit comments