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

Orhan Kislal commented on MADLIB-992:
-------------------------------------

Since HAWQ does not support UPDATE TABLE statements, I implemented an 
alternative. I would appreciate some feedback on its potential performance 
impact.
{code}
sql = m4_ifdef(<!__HAWQ__!>,
<!"""
TRUNCATE TABLE {temp_table};
INSERT INTO {temp_table}
        SELECT *
        FROM {out_table}
        WHERE {out_table}.{vertex_id} NOT IN (
                SELECT {toupdate}.id FROM {toupdate})
        UNION
        SELECT * FROM {toupdate};
DROP TABLE {out_table};
ALTER TABLE {temp_table} RENAME TO {out_table};
"""!>,
<!"""
UPDATE {out_table} SET
{weight}=toupdate.val,
parent=toupdate.parent
FROM
{toupdate} AS toupdate
WHERE
{out_table}.{vertex_id}=toupdate.id
"""!>)
{code}
Thanks

> Graph - single source shortest path
> -----------------------------------
>
>                 Key: MADLIB-992
>                 URL: https://issues.apache.org/jira/browse/MADLIB-992
>             Project: Apache MADlib
>          Issue Type: New Feature
>          Components: Module: Graph
>            Reporter: Frank McQuillan
>            Assignee: Orhan Kislal
>             Fix For: v1.10
>
>         Attachments: SSSP graph scale tests.pdf, sssp-grails.sql
>
>
> Background 
> The academic foundation for this work comes in part from Jignesh Patel at 
> University of Wisconsin-Madison, who has researched how to build graph 
> engines in relational databases [1][2][3].
> Story
> As a MADlib developer, I want to investigate how to implement shortest path 
> in an efficient and scaleable way.
> Acceptance
> 1) Interface defined
> 2) Design document updated
> 3) Form an opinion on whether 1GB workaround can be useful to improve graph 
> size and performance from https://issues.apache.org/jira/browse/MADLIB-991
> 4) Functional tests complete
> 5) Scaleability tests complete
> References
> [1] Grails paper
> http://pages.cs.wisc.edu/~jignesh/publ/Grail.pdf
> [2] Grails deck
> http://pages.cs.wisc.edu/~jignesh/publ/Grail-slides.pdf
> [3] Grails repo
> https://github.com/UWQuickstep/Grail
> [4]  Grails generated SQL for shortest patch (attached)



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

Reply via email to