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
Likely not a bug in mz but a strange behavior in pg.
Given
DROP TABLE IF EXISTS evaluation;
CREATE TABLE evaluation (row_index INT, decimal_39_8_val DECIMAL(39,8));
INSERT INTO evaluation VALUES (10, 0.99999999::DECIMAL(39,8));
SELECT array_agg(pg_typeof(decimal_39_8_val) ORDER BY row_index) FROM evaluation;
produces
in mz: a row with a column with value ['numeric'] of type text list
in pg: a row with a column with value '{numeric}' of type string
The behavior of pg seems a bit special here. When querying array_agg(decimal_39_8_val), pg will also return a list.
More details
Given
x1 = self.executor.query("SELECT array_agg(pg_typeof(decimal_39_8_val) ORDER BY row_index) FROM t_dfr_vert WHERE (row_index IN (10));")
x2 = self.executor.query("SELECT array_agg(pg_typeof(decimal_39_8_val) ORDER BY row_index) FROM t_dfr_vert WHERE (row_index IN (7,8,10));")
x3 = self.executor.query("SELECT array_agg(decimal_39_8_val ORDER BY row_index) FROM t_dfr_vert WHERE (row_index IN (7,8,10));")
x4 = self.executor.query("SELECT array_agg(text_val ORDER BY row_index) FROM t_dfr_vert WHERE (row_index IN (7,8,10));")
fetching from mz and
y1 = self.pg_executor.query("SELECT array_agg(pg_typeof(decimal_39_8_val) ORDER BY row_index) FROM t_pg_vert WHERE (row_index IN (10));")
y2 = self.pg_executor.query("SELECT array_agg(pg_typeof(decimal_39_8_val) ORDER BY row_index) FROM t_pg_vert WHERE (row_index IN (7,8, 10));")
y3 = self.pg_executor.query("SELECT array_agg(decimal_39_8_val ORDER BY row_index) FROM t_pg_vert WHERE (row_index IN (7,8, 10));")
y4 = self.pg_executor.query("SELECT array_agg(text_val ORDER BY row_index) FROM t_pg_vert WHERE (row_index IN (7,8, 10));")
Likely not a bug in mz but a strange behavior in pg.
Given
produces
['numeric']
of type text list'{numeric}'
of type stringThe behavior of pg seems a bit special here. When querying
array_agg(decimal_39_8_val)
, pg will also return a list.More details
Given
fetching from mz and
fetching from Postgres, results are:
x1
differs fromy1
andx2
differs fromy2
.The text was updated successfully, but these errors were encountered: