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

ASF GitHub Bot commented on TAJO-910:
-------------------------------------

Github user hyunsik commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/138#discussion_r17602067
  
    --- Diff: 
tajo-core/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java ---
    @@ -762,4 +785,43 @@ public static String buildExplainString(LogicalNode 
node) {
     
         return explains.toString();
       }
    +
    +  public static FragmentProto[] getNonZeroLengthDataFiles(TajoConf 
tajoConf, TableDesc tableDesc,
    +                                                          int page, int 
pageSize) throws IOException {
    +    Path tablePath = tableDesc.getPath();
    +    FileSystem fs = tablePath.getFileSystem(tajoConf);
    +
    +    List<FileStatus> nonZeroLengthFiles = new ArrayList<FileStatus>();
    +    if (fs.exists(tablePath)) {
    +      getNonZeroLengthDataFiles(fs, tablePath, nonZeroLengthFiles, page, 
pageSize);
    +    }
    +
    +    List<FileFragment> fragments = new ArrayList<FileFragment>();
    +    for (FileStatus eachFile: nonZeroLengthFiles) {
    +      FileFragment fileFragment = new FileFragment(tableDesc.getName(), 
eachFile.getPath(), 0, eachFile.getLen(), null);
    +      fragments.add(fileFragment);
    +    }
    +    return FragmentConvertor.toFragmentProtoArray(fragments.toArray(new 
FileFragment[]{}));
    +  }
    +
    +  private static void getNonZeroLengthDataFiles(FileSystem fs, Path path, 
List<FileStatus> result,
    --- End diff --
    
    Could you please add a brief comment to explain its purpose?


> Simple query (non-forwarded query) should be supported against partition 
> tables.
> --------------------------------------------------------------------------------
>
>                 Key: TAJO-910
>                 URL: https://issues.apache.org/jira/browse/TAJO-910
>             Project: Tajo
>          Issue Type: Improvement
>          Components: distributed query plan, physical operator, tajo master
>            Reporter: Hyunsik Choi
>            Assignee: Hyoungjun Kim
>             Fix For: 0.9.0
>
>
> There are two types of queries according to whether a query is executed 
> across cluster nodes or not.
> We call a query which is executed across cluster nodes *forwarded query*, 
> meaning that TajoMaster forwards the query to a query master. In contrast, we 
> call a query without distributed execution *simple query* or *non-forwarded 
> query*, which executed in only client side. The following query is an example 
> of simple query.
> {code}
> select * from table limit 10;
> {code}
> Currently, simple query is only supported against a normal table. We also 
> should support it against partitioned tables.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to