-
Notifications
You must be signed in to change notification settings - Fork 331
test: ceil and floor works correctly for Decimal128 #3848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3a46460
ae9fab2
a621e6c
7a38e50
5d32163
2f76fe3
d83b486
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,18 +15,17 @@ | |
| -- specific language governing permissions and limitations | ||
| -- under the License. | ||
|
|
||
| -- Config: spark.comet.expression.Ceil.allowIncompatible=true | ||
| -- ConfigMatrix: parquet.enable.dictionary=false,true | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: It would be nice to add a decimal column to the SQL test data so that decimal ceil/floor is tested through the SQL file framework too. Something like adding a decimal(5,2) column to the test table
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added |
||
| statement | ||
| CREATE TABLE test_ceil(f float, d double) USING parquet | ||
| CREATE TABLE test_ceil(f float, d double, dec DECIMAL(5, 2)) USING parquet | ||
|
|
||
| statement | ||
| INSERT INTO test_ceil VALUES (1.1, 1.1), (-1.1, -1.1), (0.0, 0.0), (1.0, 1.0), (NULL, NULL), (cast('NaN' as float), cast('NaN' as double)), (cast('Infinity' as float), cast('Infinity' as double)) | ||
| INSERT INTO test_ceil VALUES (1.1, 1.1, 1.10), (-1.1, -1.1, -1.10), (0.0, 0.0, 0.00), (1.0, 1.0, 1.00), (NULL, NULL, NULL), (cast('NaN' as float), cast('NaN' as double), NULL), (cast('Infinity' as float), cast('Infinity' as double), NULL) | ||
|
|
||
| query | ||
| SELECT ceil(f), ceil(d) FROM test_ceil | ||
| SELECT ceil(f), ceil(d), ceil(dec) FROM test_ceil | ||
|
|
||
| -- literal arguments | ||
| query | ||
| SELECT ceil(1.1), ceil(-1.1), ceil(0.0), ceil(NULL) | ||
| SELECT ceil(1.1), ceil(-1.1), ceil(0.0), ceil(NULL), ceil(cast(1.10 as DECIMAL(5, 2))), ceil(cast(-1.10 as DECIMAL(5, 2))) | ||
Uh oh!
There was an error while loading. Please reload this page.