Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
-- 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.

-- MinSparkVersion: 3.5
-- Config: spark.comet.exec.scalaUDF.codegen.enabled=false
-- Config: spark.comet.expression.RegExpExtractAll.allowIncompatible=false

statement
CREATE TABLE routing_regex_all(s STRING, p STRING, i INT) USING parquet

statement
INSERT INTO routing_regex_all VALUES ('ab12ab', '(ab)', 1), ('', '(ab)', 1), (NULL, '(ab)', 1)

query expect_fallback(regexp_extract_all: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT regexp_extract_all(s, '(ab)', 1) FROM routing_regex_all

query expect_fallback(regexp_extract_all: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT regexp_extract_all(s, p, i) FROM routing_regex_all
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
-- 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.

-- MinSparkVersion: 3.5
-- Config: spark.comet.exec.scalaUDF.codegen.enabled=true
-- Config: spark.comet.expression.RegExpExtractAll.allowIncompatible=false

statement
CREATE TABLE routing_regex_all(s STRING, p STRING, i INT) USING parquet

statement
INSERT INTO routing_regex_all VALUES ('ab12ab', '(ab)', 1), ('', '(ab)', 1), (NULL, '(ab)', 1)

query expect_dispatch(regexp_extract_all)
SELECT regexp_extract_all(s, '(ab)', 1) FROM routing_regex_all

query expect_dispatch(regexp_extract_all)
SELECT regexp_extract_all(s, p, i) FROM routing_regex_all
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
-- 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.

-- MinSparkVersion: 3.5
-- Config: spark.comet.exec.scalaUDF.codegen.enabled=false
-- Config: spark.comet.expression.RegExpExtractAll.allowIncompatible=true

statement
CREATE TABLE routing_regex_all(s STRING, p STRING, i INT) USING parquet

statement
INSERT INTO routing_regex_all VALUES ('ab12ab', '(ab)', 1), ('', '(ab)', 1), (NULL, '(ab)', 1)

query expect_native(regexp_extract_all)
SELECT regexp_extract_all(s, '(ab)', 1) FROM routing_regex_all

query expect_fallback(regexp_extract_all: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT regexp_extract_all(s, p, i) FROM routing_regex_all
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
-- 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.

-- Config: spark.comet.exec.scalaUDF.codegen.enabled=false
-- Config: spark.comet.expression.RLike.allowIncompatible=false
-- Config: spark.comet.expression.RegExpExtract.allowIncompatible=false
-- Config: spark.comet.expression.RegExpReplace.allowIncompatible=false
-- Config: spark.comet.expression.StringSplit.allowIncompatible=false

statement
CREATE TABLE routing_regex(s STRING, p STRING, i INT) USING parquet

statement
INSERT INTO routing_regex VALUES ('ab12ab', '(ab)', 1), ('', '(ab)', 1), (NULL, '(ab)', 1)

query expect_fallback(rlike: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT s RLIKE '(ab)' FROM routing_regex

query expect_fallback(rlike: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT s RLIKE p FROM routing_regex

query expect_fallback(regexp_extract: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT regexp_extract(s, '(ab)', 1) FROM routing_regex

query expect_fallback(regexp_extract: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT regexp_extract(s, p, i) FROM routing_regex

query expect_fallback(regexp_replace: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT regexp_replace(s, 'ab', 'x') FROM routing_regex

query expect_fallback(regexp_replace: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT regexp_replace(s, 'ab', 'x', 2) FROM routing_regex

query expect_fallback(split: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT split(s, 'ab') FROM routing_regex
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
-- 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.

-- Config: spark.comet.exec.scalaUDF.codegen.enabled=true
-- Config: spark.comet.expression.RLike.allowIncompatible=false
-- Config: spark.comet.expression.RegExpExtract.allowIncompatible=false
-- Config: spark.comet.expression.RegExpReplace.allowIncompatible=false
-- Config: spark.comet.expression.StringSplit.allowIncompatible=false

statement
CREATE TABLE routing_regex(s STRING, p STRING, i INT) USING parquet

statement
INSERT INTO routing_regex VALUES ('ab12ab', '(ab)', 1), ('', '(ab)', 1), (NULL, '(ab)', 1)

query expect_dispatch(rlike)
SELECT s RLIKE '(ab)' FROM routing_regex

query expect_dispatch(rlike)
SELECT s RLIKE p FROM routing_regex

query expect_dispatch(regexp_extract)
SELECT regexp_extract(s, '(ab)', 1) FROM routing_regex

query expect_dispatch(regexp_extract)
SELECT regexp_extract(s, p, i) FROM routing_regex

query expect_dispatch(regexp_replace)
SELECT regexp_replace(s, 'ab', 'x') FROM routing_regex

query expect_dispatch(regexp_replace)
SELECT regexp_replace(s, 'ab', 'x', 2) FROM routing_regex

query expect_dispatch(split)
SELECT split(s, 'ab') FROM routing_regex
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
-- 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.

-- Config: spark.comet.exec.scalaUDF.codegen.enabled=false
-- Config: spark.comet.expression.RLike.allowIncompatible=true
-- Config: spark.comet.expression.RegExpExtract.allowIncompatible=true
-- Config: spark.comet.expression.RegExpReplace.allowIncompatible=true
-- Config: spark.comet.expression.StringSplit.allowIncompatible=true

statement
CREATE TABLE routing_regex(s STRING, p STRING, i INT) USING parquet

statement
INSERT INTO routing_regex VALUES ('ab12ab', '(ab)', 1), ('', '(ab)', 1), (NULL, '(ab)', 1)

query expect_native(rlike)
SELECT s RLIKE '(ab)' FROM routing_regex

query expect_fallback(rlike: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT s RLIKE p FROM routing_regex

query expect_native(regexp_extract)
SELECT regexp_extract(s, '(ab)', 1) FROM routing_regex

query expect_fallback(regexp_extract: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT regexp_extract(s, p, i) FROM routing_regex

query expect_native(regexp_replace)
SELECT regexp_replace(s, 'ab', 'x') FROM routing_regex

query expect_fallback(regexp_replace: spark.comet.exec.scalaUDF.codegen.enabled=false)
SELECT regexp_replace(s, 'ab', 'x', 2) FROM routing_regex

query expect_native(split)
SELECT split(s, 'ab') FROM routing_regex
Loading