Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.0.0, 3.5.1
Description
Currently url_decode function ignores actual exception, which contains information that is useful for quickly locating the problem.
Like executing this sql:
select url_decode('https%3A%2F%2spark.apache.org');
We only get the error message:
org.apache.spark.SparkIllegalArgumentException: [CANNOT_DECODE_URL] The provided URL cannot be decoded: https%3A%2F%2spark.apache.org. Please ensure that the URL is properly formatted and try again.
at org.apache.spark.sql.errors.QueryExecutionErrors$.illegalUrlError(QueryExecutionErrors.scala:376)
at org.apache.spark.sql.catalyst.expressions.UrlCodec$.decode(urlExpressions.scala:118)
at org.apache.spark.sql.catalyst.expressions.UrlCodec.decode(urlExpressions.scala)
However, the actual useful exception information is ignored:
java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - Error at index 1 in: "2s"
Attachments
Issue Links
- relates to
-
SPARK-40156 url_decode() exposes a Java error
- Resolved
- links to