Skip to content

Expose commit parents attribute in commit table #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 18, 2018

Conversation

mcarmonaa
Copy link
Contributor

@mcarmonaa mcarmonaa commented Apr 17, 2018

A new attribute parents has been added to the commits table containing an array with each commit's parent hashes.

MySQL [(none)]> DESCRIBE TABLE commits;
+------+------+
| name | type |
+------+------+
| hash | TEXT |
| author_name | TEXT |
| author_email | TEXT |
| author_when | TIMESTAMP |
| committer_name | TEXT |
| committer_email | TEXT |
| committer_when | TIMESTAMP |
| message | TEXT |
| tree_hash | TEXT |
| parents | JSON |
+------+------+
10 rows in set (0.00 sec)
MySQL [(none)]> select hash,committer_name,parents from commits where array_length(parents) > 1 limit 10;
+------+----------------+---------+
| hash | committer_name | parents |
+------+----------------+---------+
| c1a24566f4a89001ade1441dfbd7d98a2bd93ba8 | R.J.V. Bertin  | ["e997744cc641628d28928d830ecf7ec619308d57","6c92e0f8307e79564fe305dee6b3ad5f3df11fb7"] |
| fc56503d7278925acac8f92749f0808db7ffa248 | René J.V. Bertin | ["dc876b06c1cca76d0fcab99588cff3afcdb2f39b","67809e220b47bae81e726d170fd5beb1b41dbeb5"] |
| 81b0c971b414f2d3687c9c837a3b150cfbe4c9c8 | Alexander Potashev | ["b6913c136d8d2ca1216b8c64790b2832f337931a","c8a7b1e5dca1ba6a04c2f117e7d09c607ba15f32"] |
| f1fa0c18ab2148d208920aeaa8787548ed47ae88 | Michael Palimaka | ["9a190c14d853b46c24d326063f913c3efe384f9b","2dce7ebe83e24451053aaa5ffe3822b5f1cb14b9"] |
| 8a4e4ab5e2788fbd688a2d161bb2f70ab2c8e7f1 | Harald Sitter  | ["a69a759297b0b936617456712abf98b7efdd90a0","496f618a970c17568976b4fece4222e4ac55257b"] |
| afd851908793496f47d921c02fa56855a1200cc2 | Aleix Pol      | ["ba6956e6242d25360110a9bbf838d2eb3fb77479","73df960e45ff0bf58865c18be43381d8f4da3d8e"] |
| 7d15e6a9d071032a8783471b4e3518cf5388dfaf | Lingerhk       | ["9189de7f9cb11ebb6fc6cf304c035d5f1f41b9ed","3eae80004b064f155604519d5a92ad80a0f521f7"] |
| 7a3b4628002d59e8a6faa0bb057873c95a5c5b8d | wangbo         | ["be3476f843480c101d5291317df364460d7abec1","1008be932248a16e5a9500be4129efeeb4564b39"] |
| 01348bced4cd560ca86a02bf484988da134f7d3f | wangbo         | ["fff7062de8474d10a67d417ccea87ba6f58ca81d","563524c36b5e80acfd1ff0aca2386e934e4fa625"] |
| d25925ced790fa79290dc47de3336cdb73004061 | linky          | ["42c74a8b0b7e8d0afc3275e409bfba5c15fe8af6","cd9e145151fb50885fc17294dc57746fcce04801"] |
+------+----------------+---------+
10 rows in set (0.16 sec)

Closes #226

@mcarmonaa
Copy link
Contributor Author

@src-d/data-retrieval please review (for some reason the "reviewers searcher" doesn't work)

Copy link
Contributor

@smola smola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a test that uses it and checks its result?

@erizocosmico
Copy link
Contributor

erizocosmico commented Apr 17, 2018

LGTM after tests for this are added, as @smola said

Signed-off-by: Manuel Carmona <[email protected]>
@mcarmonaa
Copy link
Contributor Author

@smola @erizocosmico I already added the test 👍

@mcarmonaa mcarmonaa merged commit 0bd1c13 into src-d:master Apr 18, 2018
@mcarmonaa mcarmonaa deleted the feature/expose-commits-parents branch April 24, 2018 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants