comphead commented on code in PR #4349: URL: https://github.com/apache/datafusion-comet/pull/4349#discussion_r3269426586
########## spark/src/test/resources/sql-tests/expressions/math/factorial.sql: ########## @@ -0,0 +1,68 @@ +-- 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. + +-- ConfigMatrix: parquet.enable.dictionary=false,true + +statement +CREATE TABLE test_factorial( + b tinyint, + s smallint, + i int, + l bigint, + f float, + d double, + dec38 decimal(38, 0), + dec10_2 decimal(10, 2) +) USING parquet + +statement +INSERT INTO test_factorial VALUES + (cast(0 as tinyint), cast(0 as smallint), 0, cast(0 as bigint), cast(0.0 as float), 0.0, cast(0 as decimal(38, 0)), cast(0.00 as decimal(10, 2))), + (cast(1 as tinyint), cast(1 as smallint), 1, cast(1 as bigint), cast(1.0 as float), 1.0, cast(1 as decimal(38, 0)), cast(1.49 as decimal(10, 2))), + (cast(5 as tinyint), cast(5 as smallint), 5, cast(5 as bigint), cast(5.7 as float), 5.7, cast(5 as decimal(38, 0)), cast(5.50 as decimal(10, 2))), + (cast(20 as tinyint), cast(20 as smallint), 20, cast(20 as bigint), cast(20.0 as float), 20.0, cast(20 as decimal(38, 0)), cast(20.99 as decimal(10, 2))), + (cast(21 as tinyint), cast(21 as smallint), 21, cast(21 as bigint), cast(21.0 as float), 21.0, cast(21 as decimal(38, 0)), cast(21.00 as decimal(10, 2))), + (cast(-1 as tinyint), cast(-1 as smallint), -1, cast(-1 as bigint), cast(-1.0 as float), -1.0, cast(-1 as decimal(38, 0)), cast(-1.50 as decimal(10, 2))), + (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (cast(127 as tinyint), cast(32767 as smallint), 2147483647, 9223372036854775807, cast('Infinity' as float), cast('Infinity' as double), cast(99999999999999999999999999999999999999 as decimal(38, 0)), cast(99999999.99 as decimal(10, 2))), + (cast(-128 as tinyint),cast(-32768 as smallint),-2147483648,-9223372036854775808, cast('-Infinity' as float), cast('-Infinity' as double), cast(-99999999999999999999999999999999999999 as decimal(38, 0)),cast(-99999999.99 as decimal(10, 2))), Review Comment: Thats actually 2 good points here: - we need to include ansi into the test configuration matrix, for all tests to see how it works with ANSI - Spark 4 should be failing with ansi true by default, checking why it didn't -- 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]
