|
| 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 | +-- Config: spark.comet.exec.scalaUDF.codegen.enabled=false |
| 19 | +-- Config: spark.comet.expression.StringTranslate.allowIncompatible=false |
| 20 | + |
| 21 | +statement |
| 22 | +CREATE TABLE routing_strings(s STRING, p STRING, b BINARY, a ARRAY<INT>) USING parquet |
| 23 | + |
| 24 | +statement |
| 25 | +INSERT INTO routing_strings VALUES ('h_llo', 'h_llo', unhex('4142'), array(1, 2)), ('hello', 'h_llo', unhex(''), array()), (NULL, NULL, NULL, NULL) |
| 26 | + |
| 27 | +query expect_native(like) |
| 28 | +SELECT s LIKE p FROM routing_strings |
| 29 | + |
| 30 | +query expect_native(concat) |
| 31 | +SELECT concat(s, '!') FROM routing_strings |
| 32 | + |
| 33 | +query expect_native(concat_ws) |
| 34 | +SELECT concat_ws('-', s, 'x') FROM routing_strings |
| 35 | + |
| 36 | +query expect_fallback(like: spark.comet.exec.scalaUDF.codegen.enabled=false) |
| 37 | +SELECT s LIKE 'h$_llo' ESCAPE '$' FROM routing_strings |
| 38 | + |
| 39 | +query expect_fallback(concat: spark.comet.exec.scalaUDF.codegen.enabled=false) |
| 40 | +SELECT concat(b, b), concat(a, a) FROM routing_strings |
| 41 | + |
| 42 | +query expect_fallback(concat_ws: spark.comet.exec.scalaUDF.codegen.enabled=false) |
| 43 | +SELECT concat_ws('-', 'a', 'b') |
| 44 | + |
| 45 | +query expect_fallback(translate: spark.comet.exec.scalaUDF.codegen.enabled=false) |
| 46 | +SELECT translate(s, 'hl', 'HL') FROM routing_strings |
0 commit comments