|
| 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 | +statement |
| 19 | +CREATE TABLE test_bin(i int, l long, f float, d double) USING parquet |
| 20 | + |
| 21 | +statement |
| 22 | +INSERT INTO test_bin VALUES |
| 23 | +(13, 1, 1.5, 1.5), |
| 24 | +(1, 1, 0.1, 0.1), |
| 25 | +(100, 100, 99.99, 99.99), |
| 26 | +(255, 255, 255.255, 255.255), |
| 27 | +(-13, -1, -1.5, -1.5), |
| 28 | +(-1, -1, -0.1, -0.1), |
| 29 | +(-100, -100, -99.99, -99.99), |
| 30 | +(-255, -255, -255.255, -255.255), |
| 31 | +(0, 0, 0.0, 0.0), |
| 32 | +(0, 0, -0.0, -0.0), |
| 33 | +(NULL, NULL, NULL, NULL), |
| 34 | +(2147483647, 9223372036854775807, cast('Infinity' as float), cast('Infinity' as double)), |
| 35 | +(-2147483648, -9223372036854775808, cast('-Infinity' as float), cast('-Infinity' as double)), |
| 36 | +(100, 100, cast('Infinity' as float), cast('Infinity' as double)), |
| 37 | +(200, 200, cast('-Infinity' as float), cast('-Infinity' as double)), |
| 38 | +(300, 300, cast('NaN' as float), cast('NaN' as double)), |
| 39 | +(5, 5, 1.401298464e-45, 4.9406564584124654e-324), |
| 40 | +(1000, 1000, 3.402823466e+38, 1.7976931348623157e+308), |
| 41 | +(7, 7, 0.1, 0.1), |
| 42 | +(8, 8, 0.2, 0.2), |
| 43 | +(9, 9, 0.3, 0.3), |
| 44 | +(10, 10, 0.3333333333333333, 0.3333333333333333), |
| 45 | +(500, 500, cast('NaN' as float), cast('Infinity' as double)), |
| 46 | +(501, 501, cast('Infinity' as float), cast('NaN' as double)), |
| 47 | +(502, 502, cast('-Infinity' as float), cast('NaN' as double)), |
| 48 | +(503, 503, cast('NaN' as float), cast('-Infinity' as double)), |
| 49 | +(123456789, 123456789, 123456.789, 123456789.123456789), |
| 50 | +(-123456789, -123456789, -123456.789, -123456789.123456789), |
| 51 | +(2147483646, 9223372036854775806, 999999.999, 999999999.999999999), |
| 52 | +(-2147483647, -9223372036854775807, -999999.999, -999999999.999999999), |
| 53 | +(999, NULL, NULL, 999.999), |
| 54 | +(NULL, 888, 888.888, NULL), |
| 55 | +(777, 777, NULL, 777.777), |
| 56 | +(666, 666, 666.666, NULL), |
| 57 | +(15, 15, 1.23456789, 1.2345678901234567), |
| 58 | +(16, 16, -1.23456789, -1.2345678901234567), |
| 59 | +(314, 314, 3.14159265, 3.14159265358979323846), |
| 60 | +(271, 271, 2.71828183, 2.71828182845904523536); |
| 61 | + |
| 62 | +query |
| 63 | +SELECT bin(i), bin(l), bin(f), bin(d) FROM test_bin |
| 64 | + |
| 65 | +-- literal arguments |
| 66 | +query |
| 67 | +SELECT bin(-5), bin(-1.5), bin(0), bin(NULL) |
0 commit comments