You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "YoungGyu Chun (Jira)" <ji...@apache.org> on 2020/02/27 14:17:00 UTC

[jira] [Comment Edited] (SPARK-29969) parse_url function result in incorrect result

    [ https://issues.apache.org/jira/browse/SPARK-29969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17045059#comment-17045059 ] 

YoungGyu Chun edited comment on SPARK-29969 at 2/27/20 2:16 PM:
----------------------------------------------------------------

[~xiaoxigua] is this issue relating to Spark? The example provided looks like the issue of the beeline or hive.


was (Author: younggyuchun):
[~xiaoxigua] is this issue is relating to Spark? The example provided looks like the issue of the beeline or hive.

> parse_url function result in incorrect result
> ---------------------------------------------
>
>                 Key: SPARK-29969
>                 URL: https://issues.apache.org/jira/browse/SPARK-29969
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.3.1, 2.4.4
>            Reporter: Victor Zhang
>            Priority: Major
>         Attachments: hive-result.jpg, spark-result.jpg
>
>
> In this Jira using java.net.URI instead of java.net.URL for performance reason.
> https://issues.apache.org/jira/browse/SPARK-16826
> However, in the case of some unconventional parameters, it can lead to incorrect results.
> For example, when the URL is encoded, the function cannot resolve the correct result.
>  
> {code}
> 0: jdbc:hive2://localhost:10000> SELECT parse_url('http://uzzf.down.gsxzq.com/download/%E5%B8%B8%E7%94%A8%E9%98%80%E9%97%A8CAD%E5%9B%BE%E7%BA%B8%E5%A4%', 'HOST');
> +------------------------------------------------------------------------------------------------------------------------+--+
> | parse_url(http://uzzf.down.gsxzq.com/download/%E5%B8%B8%E7%94%A8%E9%98%80%E9%97%A8CAD%E5%9B%BE%E7%BA%B8%E5%A4%, HOST) |
> +------------------------------------------------------------------------------------------------------------------------+--+
> | NULL |
> +------------------------------------------------------------------------------------------------------------------------+--+
> 1 row selected (0.094 seconds)
>  
> hive> SELECT parse_url('http://uzzf.down.gsxzq.com/download/%E5%B8%B8%E7%94%A8%E9%98%80%E9%97%A8CAD%E5%9B%BE%E7%BA%B8%E5%A4%', 'HOST');
> OK
> HEADER: _c0
> uzzf.down.gsxzq.com
> Time taken: 4.423 seconds, Fetched: 1 row(s)
> {code}
>  
> Here's a similar problem.
> https://issues.apache.org/jira/browse/SPARK-23056
> Our team used the spark function to run data for months, but now we have to run it again.
> It's just too painful.:(:(:(
>  
>  
>  
>  
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org