|
| 1 | +-- Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +-- or more contributor license agreements. See the NOTICE file |
| 3 | +-- distributed with this work for additional information |
| 4 | +-- regarding copyright ownership. The ASF licenses this file |
| 5 | +-- to you under the Apache License, Version 2.0 (the |
| 6 | +-- "License"); you may not use this file except in compliance |
| 7 | +-- with the License. You may obtain a copy of the License at |
| 8 | +-- |
| 9 | +-- http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +-- |
| 11 | +-- Unless required by applicable law or agreed to in writing, |
| 12 | +-- software distributed under the License is distributed on an |
| 13 | +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +-- KIND, either express or implied. See the License for the |
| 15 | +-- specific language governing permissions and limitations |
| 16 | +-- under the License. |
| 17 | + |
| 18 | +-- ConfigMatrix: parquet.enable.dictionary=false,true |
| 19 | + |
| 20 | +statement |
| 21 | +CREATE TABLE test_double_to_string(d double, id int) USING parquet |
| 22 | + |
| 23 | +statement |
| 24 | +INSERT INTO test_double_to_string VALUES |
| 25 | + (-0.0, 1), |
| 26 | + (0.0, 2), |
| 27 | + (1.5, 3), |
| 28 | + (-1.5, 4), |
| 29 | + (cast('NaN' as double), 5), |
| 30 | + (cast('Infinity' as double), 6), |
| 31 | + (cast('-Infinity' as double), 7), |
| 32 | + (NULL, 8), |
| 33 | + (1.0E20, 9), |
| 34 | + (1.0E-20, 10), |
| 35 | + (-1.0E20, 11), |
| 36 | + (0.001, 12), |
| 37 | + (123456789.0, 13), |
| 38 | + (1.23456789E10, 14) |
| 39 | + |
| 40 | +query |
| 41 | +SELECT cast(d as string), id FROM test_double_to_string ORDER BY id |
| 42 | + |
| 43 | +query |
| 44 | +SELECT cast(-0.0 as string), cast(0.0 as string) |
0 commit comments