drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paul-rogers <...@git.apache.org>
Subject [GitHub] drill pull request #731: DRILL-5224: CTTAS: fix errors connected with system...
Date Fri, 03 Feb 2017 18:03:16 GMT
Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/731#discussion_r99389277
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/user/UserSession.java
---
    @@ -278,7 +277,7 @@ public boolean setSessionOption(String name, String value) {
        */
       public String registerTemporaryTable(AbstractSchema schema, String tableName) throws
IOException {
           addTemporaryLocation((WorkspaceSchemaFactory.WorkspaceSchema) schema);
    -      String temporaryTableName = Paths.get(sessionId, UUID.randomUUID().toString()).toString();
    +      String temporaryTableName = new Path(sessionId, UUID.randomUUID().toString()).toUri().getPath();
    --- End diff --
    
    I wonder if we should use one of the many platform-independent path representations? We
have the original Java `File`, the new Java `Path`, the Hadoop HDFS `Path`... If we use strings
for paths, we run into the very problems that those packages are designed to address.
    
    For example, do the above handle the "D:" directory suffix on Windows? Resolving "." and
".." in paths? The "~" indicator of use home folder? These all vary across platforms.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message