Re: [PR] fix: Throw coercion error for `LIKE` operations for nested types. [datafusion]

2026-02-09 Thread via GitHub


Jefffrey commented on PR #20212:
URL: https://github.com/apache/datafusion/pull/20212#issuecomment-3874737895

   Thanks @jonathanc-n & @neilconway 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] fix: Throw coercion error for `LIKE` operations for nested types. [datafusion]

2026-02-09 Thread via GitHub


Jefffrey merged PR #20212:
URL: https://github.com/apache/datafusion/pull/20212


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] fix: Throw coercion error for `LIKE` operations for nested types. [datafusion]

2026-02-08 Thread via GitHub


neilconway commented on PR #20212:
URL: https://github.com/apache/datafusion/pull/20212#issuecomment-3867234914

   Thanks for taking this on -- lgtm!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] fix: Throw coercion error for `LIKE` operations for nested types. [datafusion]

2026-02-08 Thread via GitHub


jonathanc-n commented on code in PR #20212:
URL: https://github.com/apache/datafusion/pull/20212#discussion_r2778961829


##
datafusion/sqllogictest/test_files/type_coercion.slt:
##
@@ -254,3 +254,30 @@ DROP TABLE orders;
 
 ## Test type coercion with UNIONs end ##
 
+
+# https://github.com/apache/datafusion/issues/15661
+# LIKE is a string pattern matching operator and is not supported for nested 
types.
+
+statement ok
+CREATE TABLE t0(v0 BIGINT, v1 STRING, v2 BOOLEAN);
+
+statement ok
+INSERT INTO t0(v0, v2) VALUES (123, true);
+
+query error There isn't a common type to coerce .* in .* expression
+SELECT true FROM t0 WHERE ((REGEXP_MATCH(t0.v1, t0.v1)) NOT LIKE 
(REGEXP_MATCH(t0.v1, t0.v1, 'jH')));

Review Comment:
   Yes good point, i made the changes for the others but kept this specific 
line:
   
   ```
   SELECT true FROM t0 WHERE ((REGEXP_MATCH(t0.v1, t0.v1)) NOT LIKE 
(REGEXP_MATCH(t0.v1, t0.v1, 'jH')));
   ```
   
   To just show replication of the query in the issue



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] fix: Throw coercion error for `LIKE` operations for nested types. [datafusion]

2026-02-07 Thread via GitHub


Jefffrey commented on code in PR #20212:
URL: https://github.com/apache/datafusion/pull/20212#discussion_r2778416458


##
datafusion/sqllogictest/test_files/type_coercion.slt:
##
@@ -254,3 +254,30 @@ DROP TABLE orders;
 
 ## Test type coercion with UNIONs end ##
 
+
+# https://github.com/apache/datafusion/issues/15661
+# LIKE is a string pattern matching operator and is not supported for nested 
types.
+
+statement ok
+CREATE TABLE t0(v0 BIGINT, v1 STRING, v2 BOOLEAN);
+
+statement ok
+INSERT INTO t0(v0, v2) VALUES (123, true);
+
+query error There isn't a common type to coerce .* in .* expression
+SELECT true FROM t0 WHERE ((REGEXP_MATCH(t0.v1, t0.v1)) NOT LIKE 
(REGEXP_MATCH(t0.v1, t0.v1, 'jH')));

Review Comment:
   Would these be easier to read by replacing the second regexp_match with just 
an array literal?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]