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

ASF GitHub Bot commented on PIRK-19:
------------------------------------

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

    https://github.com/apache/incubator-pirk/pull/26#discussion_r72371135
  
    --- Diff: src/main/java/org/apache/pirk/schema/query/QuerySchemaLoader.java 
---
    @@ -246,8 +231,11 @@ private static QuerySchema loadQuerySchemaFile(String 
schemaFile, boolean hdfs,
         }
     
         // Create the query schema object
    -    querySchema = new QuerySchema(schemaName, dataSchemaName, 
elementNames, selectorName, dataElementSize, filterNamesSet, filter);
     
    +    DataFilter filter = instantiateFilter(filterTypeName, filterNamesSet);
    +    querySchema = new QuerySchema(schemaName, dataSchemaName, 
selectorName, filterTypeName, filter, dataElementSize);
    --- End diff --
    
    As a very small (kind of nitty) style item, I would much rather have setter 
methods for QuerySchema to set the `elementName`  and `filterNamesSet` rather 
than setting these fields via 
    
    ```
    querySchema.getElementNames().addAll(elementNames);
    querySchema.getFilteredElementNames().addAll(filterNamesSet);
    ```
    
    In the original code, these were passed in as part of the constructor 
(which has now been removed in this refactor). 



> Make DataSchema/QuerySchema Agnostic of Persistent Representation
> -----------------------------------------------------------------
>
>                 Key: PIRK-19
>                 URL: https://issues.apache.org/jira/browse/PIRK-19
>             Project: PIRK
>          Issue Type: Bug
>          Components: Data and Query Schemas
>            Reporter: Ellison Anne Williams
>            Assignee: Tim Ellison
>
> Make the DataSchema and QuerySchema classes agnostic of their potential 
> persistent representations, then have 'providers' that applications can use 
> to load/store in a variety of formats.
> For example, in LoadDataSchemas, the data schema XML file is parsed to create 
> a DataSchema object (one for each data schema specified). The DataSchema 
> object could be created from other sources.
> Perhaps JSON representation would be a good starting place.



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

Reply via email to