sunchao commented on code in PR #5393:
URL: https://github.com/apache/datafusion-comet/pull/5393#discussion_r3814291350
##########
spark/src/test/resources/sql-tests/expressions/array/array_repeat.sql:
##########
@@ -39,8 +39,8 @@ INSERT INTO test_array_repeat VALUES
(CAST(127 AS TINYINT), CAST(32767 AS SMALLINT), 2147483647,
9223372036854775807, CAST('Infinity' AS FLOAT), CAST('Infinity' AS DOUBLE),
CAST(99999999999999999999999999999999999999 AS DECIMAL(38, 0)), true, 'a',
X'01', DATE '1970-01-01', TIMESTAMP '1970-01-01 00:00:00', array(1, 2, 3), 3),
(CAST(-128 AS TINYINT), CAST(-32768 AS SMALLINT), -2147483648,
-9223372036854775808, CAST('-Infinity' AS FLOAT), CAST('-Infinity' AS DOUBLE),
CAST(-99999999999999999999999999999999999999 AS DECIMAL(38, 0)), false, 'é',
X'02FF', DATE '9999-12-31', TIMESTAMP '9999-12-31 23:59:59', array(), 2),
(CAST(0 AS TINYINT), CAST(0 AS SMALLINT), 0, 0, CAST('NaN' AS FLOAT),
CAST('NaN' AS DOUBLE), CAST(0 AS DECIMAL(38, 0)), false, '', X'', DATE
'2024-02-29', TIMESTAMP '2024-02-29 12:34:56', array(NULL, 1, NULL), 1),
- (NULL, NULL, NULL, NULL, CAST(0.0 AS FLOAT), CAST(-0.0 AS DOUBLE), NULL,
NULL, '日本', X'00', NULL, NULL, NULL, 0),
- (CAST(1 AS TINYINT), CAST(1 AS SMALLINT), 1, 1, CAST(-0.0 AS FLOAT),
CAST(0.0 AS DOUBLE), CAST(1 AS DECIMAL(38, 0)), true, NULL, NULL, DATE
'2000-01-01', TIMESTAMP '2000-01-01 00:00:00', array(7), -1),
+ (NULL, NULL, NULL, NULL, CAST(0.0 AS FLOAT), double('-0.0'), NULL, NULL,
'日本', X'00', NULL, NULL, NULL, 0),
+ (CAST(1 AS TINYINT), CAST(1 AS SMALLINT), 1, 1, float('-0.0'), CAST(0.0 AS
DOUBLE), CAST(1 AS DECIMAL(38, 0)), true, NULL, NULL, DATE '2000-01-01',
TIMESTAMP '2000-01-01 00:00:00', array(7), -1),
Review Comment:
[P2] Exercise signed zero with a positive repeat count
Could we also run `array_repeat(float_v, 2)` and `array_repeat(double_v, 2)`
against this table? Both corrected negative-zero cells currently have
nonpositive counts, so their results are empty arrays. An implementation that
loses the sign would still pass these tests, leaving this part of #5271
unverified. Please retain the existing zero- and negative-count cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]