You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Internal error: The "regex_replace" function can only accept strings #7345
On running the query below on the Clickbench multi file dataset,
SELECT REGEXP_REPLACE("Referer", '^https?://(?:www.)?([^/]+)/.*$', '1') AS k, AVG(length("Referer")) AS l, COUNT(*) AS c, MIN("Referer") FROM hits WHERE"Referer"<>''GROUP BY k HAVINGCOUNT(*) >100000ORDER BY l DESCLIMIT25;
we get this error,
Internal error: The "regex_replace"functioncan only accept strings.. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
To Reproduce
Download the data using,
./benchmarks/bench.sh data clickbench_partitioned
A hits_multi directory with the parquet files will be created.
This looks similar to #7039 which @jonahgao fixed by adding a coercion from binary --> UTF8 for comparison. I think we could do something similar here.
Activity
alamb commentedon Aug 21, 2023
This looks similar to #7039 which @jonahgao fixed by adding a coercion from binary --> UTF8 for comparison. I think we could do something similar here.
alamb commentedon Aug 21, 2023
Marking as a good first issue as there is a reproducer and I think the fix should be relatively straightforward
Weijun-H commentedon Aug 22, 2023
I am glad to fix it.