You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (JIRA)" <ji...@apache.org> on 2018/08/28 17:11:00 UTC

[jira] [Comment Edited] (CALCITE-2495) Rework URL->File conversion in tests

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

Vladimir Sitnikov edited comment on CALCITE-2495 at 8/28/18 5:10 PM:
---------------------------------------------------------------------

{quote}You mis-spelled "handle" as "hanle".{quote}
-Where-
Nevermind, I've fixed that in signatures.txt


was (Author: vladimirsitnikov):
{quote}You mis-spelled "handle" as "hanle".{quote}
Where?

> Rework URL->File conversion in tests
> ------------------------------------
>
>                 Key: CALCITE-2495
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2495
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Major
>
> {{URL.getPath()}} produces %20 when path contains spaces.
> I suggest to rework all the uses of {{getResource()...}} to use {{Sources.of(URL)}} so there's single -point of failure- way to convert URL to File.
> This resolves Apache CI which happens to have a space in folder name.
> For the record:
> 1) {{URL.getPath()}} produces %20, so it is added to forbidden signatures
> 2) {{Paths.get(url.toURI()).toFile()}} almost works, however it fails with URL is not hierarchical for {{new URL("file:test.java")}}
> 3) {{new File(URL.toURI()}} is worse than #2
> 4) {{URLDecoder}} must not be used to decode %20, since it will convert {{+}} to spaces as well, thus it will corrupt {{test.c++}}
> 5) It looks like {{url.toURI().getSchemeSpecificPart())}} properly handles "opaque" URIs (which are relative {{file:test.java}} kind of URLs)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Re: [jira] [Comment Edited] (CALCITE-2495) Rework URL->File conversion in tests

Posted by Sergey Nuyanzin <sn...@gmail.com>.
>> Can someone please test this on Windows before we submit?

was able to pass mvn clean install on Windows however made several changes
to do that
all mentioned in comments for the PR
https://github.com/apache/calcite/pull/807

On Tue, Aug 28, 2018 at 8:11 PM Vladimir Sitnikov (JIRA) <ji...@apache.org>
wrote:

>
>     [
> https://issues.apache.org/jira/browse/CALCITE-2495?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16595314#comment-16595314
> ]
>
> Vladimir Sitnikov edited comment on CALCITE-2495 at 8/28/18 5:10 PM:
> ---------------------------------------------------------------------
>
> {quote}You mis-spelled "handle" as "hanle".{quote}
> -Where-
> Nevermind, I've fixed that in signatures.txt
>
>
> was (Author: vladimirsitnikov):
> {quote}You mis-spelled "handle" as "hanle".{quote}
> Where?
>
> > Rework URL->File conversion in tests
> > ------------------------------------
> >
> >                 Key: CALCITE-2495
> >                 URL: https://issues.apache.org/jira/browse/CALCITE-2495
> >             Project: Calcite
> >          Issue Type: Bug
> >            Reporter: Vladimir Sitnikov
> >            Assignee: Julian Hyde
> >            Priority: Major
> >
> > {{URL.getPath()}} produces %20 when path contains spaces.
> > I suggest to rework all the uses of {{getResource()...}} to use
> {{Sources.of(URL)}} so there's single -point of failure- way to convert URL
> to File.
> > This resolves Apache CI which happens to have a space in folder name.
> > For the record:
> > 1) {{URL.getPath()}} produces %20, so it is added to forbidden signatures
> > 2) {{Paths.get(url.toURI()).toFile()}} almost works, however it fails
> with URL is not hierarchical for {{new URL("file:test.java")}}
> > 3) {{new File(URL.toURI()}} is worse than #2
> > 4) {{URLDecoder}} must not be used to decode %20, since it will convert
> {{+}} to spaces as well, thus it will corrupt {{test.c++}}
> > 5) It looks like {{url.toURI().getSchemeSpecificPart())}} properly
> handles "opaque" URIs (which are relative {{file:test.java}} kind of URLs)
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v7.6.3#76005)
>


-- 
Best regards,
Sergey