You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hivemall.apache.org by myui <gi...@git.apache.org> on 2017/06/26 11:54:36 UTC

[GitHub] incubator-hivemall pull request #90: [HIVEMALL-96-2] Added Geo Spatial UDFs

GitHub user myui opened a pull request:

    https://github.com/apache/incubator-hivemall/pull/90

    [HIVEMALL-96-2] Added Geo Spatial UDFs

    ## What changes were proposed in this pull request?
    
    This PR added 5 Geo Spatial UDFs:  `lat2tiley, lon2tilex, tilex2lon, tileytolat, and haversine_distance`.
    
    ## What type of PR is it?
    
    Feature
    
    ## What is the Jira issue?
    
    https://issues.apache.org/jira/browse/HIVEMALL-96
    
    ## How was this patch tested?
    
    Unit tests and manual tests
    
    ## How to use this feature?
    
    ```sql
    WITH data as (
      select 51.51202 as lat, 0.02435 as lon, 17 as zoom
      union all
      select 51.51202 as lat, 0.02435 as lon, 4 as zoom
      union all
      select null as lat, 0.02435 as lon, 17 as zoom
    )
    select 
       lat, lon, zoom,
       tile(lat, lon, zoom) as tile,
       (lon2tilex(lon,zoom) + lat2tiley(lat,zoom) * cast(pow(2, zoom) as bigint)) as tile2, 
       lon2tilex(lon, zoom) as xtile,
       lat2tiley(lat, zoom) as ytile,
       tiley2lat(lat2tiley(lat, zoom), zoom) as lat2,  -- tiley2lat returns center of the tile
       tilex2lon(lon2tilex(lon, zoom), zoom) as lon2 -- tilex2lon returns center of the tile
    from 
       data;
    
    select 
      haversine_distance(35.6833, 139.7667, 34.6603, 135.5232) as km,
      haversine_distance(35.6833, 139.7667, 34.6603, 135.5232, true) as mile;
    ```


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

    $ git pull https://github.com/myui/incubator-hivemall HIVEMALL-96-2

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

    https://github.com/apache/incubator-hivemall/pull/90.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 #90
    
----
commit 7e2abfa377ba807d5ecb0b16c1493552ffc882be
Author: Makoto Yui <yu...@gmail.com>
Date:   2017-06-26T11:04:37Z

    Fixed package of DoubleWritable

commit 99e35bc2aeba40dd4d3a1661c6d4fc3ff9514edf
Author: Makoto Yui <yu...@gmail.com>
Date:   2017-06-26T11:49:26Z

    Fixed tile() to return bigint instead of int

commit 6c391786cf877ef3080db9403192c55700491bae
Author: Makoto Yui <yu...@gmail.com>
Date:   2017-06-26T11:50:24Z

    Added Geo Spatial UDFs

----


---
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.
---

[GitHub] incubator-hivemall issue #90: [HIVEMALL-96-2] Added Geo Spatial UDFs

Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:

    https://github.com/apache/incubator-hivemall/pull/90
  
    
    [![Coverage Status](https://:/builds/12131284/badge)](https://:/builds/12131284)
    
    Coverage increased (+0.2%) to 40.19% when pulling **6c391786cf877ef3080db9403192c55700491bae on myui:HIVEMALL-96-2** into **c06378a81723e3998f90c08ec7444ead5b6f2263 on apache:master**.



---
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.
---

[GitHub] incubator-hivemall pull request #90: [HIVEMALL-96-2] Added Geo Spatial UDFs

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-hivemall/pull/90


---
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.
---