You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/09/12 17:58:21 UTC

[jira] [Commented] (METRON-412) Limit Profiler to Numeric Types Via Type System

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

ASF GitHub Bot commented on METRON-412:
---------------------------------------

GitHub user nickwallen opened a pull request:

    https://github.com/apache/incubator-metron/pull/247

    METRON-412 Limit Profiler to Numeric Types Via Type System

    [METRON-412](https://issues.apache.org/jira/browse/METRON-412)
    
    A `ProfileMeasurement` value must now be a `Number` not just any `Object`.  This more accurately reflects the requirements of a value, which must be numeric.  This was previously only checked at run-time, but with these changes it is now enforced at compile-time.
    
    In addition, changed the `Serializer` from a simple container of two static methods, to an "interface plus implementation" that can be optionally swapped-out with a different implementation, should that be needed.  I imagine that someone may want to support BigInteger or something else like that in the future. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nickwallen/incubator-metron METRON-412

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-metron/pull/247.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #247
    
----
commit da16eb92f610dafa239edfe132107b60fde3e222
Author: Nick Allen <ni...@nickallen.org>
Date:   2016-09-02T18:10:56Z

    METRON-391 Create Stellar Function to Read Profile Data for Model Scoring

commit f2750bde9f2a46ec1b8c9a0ae192997c17c03757
Author: Nick Allen <ni...@nickallen.org>
Date:   2016-09-12T15:52:43Z

    METRON-412 Limit Profiler to Numeric Types Via Type System

----


> Limit Profiler to Numeric Types Via Type System
> -----------------------------------------------
>
>                 Key: METRON-412
>                 URL: https://issues.apache.org/jira/browse/METRON-412
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>
> The current implementation introduced in METRON-389 allows a ProfileMeasurement's value to be any Object.  At runtime, this type is checked and an exception is thrown if the type is not numeric.  It would be possible and much cleaner to use the type system to do this checking at compile-time.



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