[ https://issues.apache.org/jira/browse/SPARK-48806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kent Yao reassigned SPARK-48806: -------------------------------- Assignee: Zhen Wang > Pass actual exception when url_decode fails > ------------------------------------------- > > Key: SPARK-48806 > URL: https://issues.apache.org/jira/browse/SPARK-48806 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 4.0.0, 3.5.1 > Reporter: Zhen Wang > Assignee: Zhen Wang > Priority: Minor > Labels: pull-request-available > > Currently url_decode function ignores actual exception, which contains > information that is useful for quickly locating the problem. > > Like executing this sql: > {code:java} > select url_decode('https%3A%2F%2spark.apache.org'); {code} > We only get the error message: > {code:java} > 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) > {code} > However, the actual useful exception information is ignored: > {code:java} > java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in > escape (%) pattern - Error at index 1 in: "2s" {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org