Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 75C49200B5E for ; Wed, 27 Jul 2016 04:17:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 74498160AA5; Wed, 27 Jul 2016 02:17:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BCBE0160AA4 for ; Wed, 27 Jul 2016 04:17:24 +0200 (CEST) Received: (qmail 96142 invoked by uid 500); 27 Jul 2016 02:17:24 -0000 Mailing-List: contact commits-help@pirk.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pirk.incubator.apache.org Delivered-To: mailing list commits@pirk.incubator.apache.org Received: (qmail 96133 invoked by uid 99); 27 Jul 2016 02:17:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2016 02:17:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 779D3C04DD for ; Wed, 27 Jul 2016 02:17:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.507 X-Spam-Level: X-Spam-Status: No, score=-4.507 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.287] autolearn=disabled Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 7bfPkReys1kz for ; Wed, 27 Jul 2016 02:17:22 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with SMTP id E25795FAE8 for ; Wed, 27 Jul 2016 02:17:21 +0000 (UTC) Received: (qmail 95551 invoked by uid 99); 27 Jul 2016 02:17:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jul 2016 02:17:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D4A922C0D64 for ; Wed, 27 Jul 2016 02:17:20 +0000 (UTC) Date: Wed, 27 Jul 2016 02:17:20 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: commits@pirk.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PIRK-19) Make DataSchema/QuerySchema Agnostic of Persistent Representation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 27 Jul 2016 02:17:25 -0000 [ 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)