The main branch: PrestoDB source code
Presto is an open source project that is developed in the open on the public Github repository: https://github.com/prestodb/presto. The prestodb repo is the original, master repo from when it was first developed at Facebook and subsequently open sourced the code base on Github in 2013 under the Apache 2.0 license, a permissive license which lets anyone download and use the code.
Whether you call it master, trunk, upstream, or mainline, those all refer to the prestodb repo: https://github.com/prestodb/presto. That means it is the single, shared, current state of the software project. Whenever you wish to start a new piece of work, you would pull code from this origin into your local repository and begin coding. The master repo is the single shared, codeline and represents the central repo and single point of record for the project. Most Presto clones or forks come from prestodb.
It is worth noting that the Facebook team continues to develop and run the prestodb project in production at Facebook at scale. So the community benefits from the development and testing that Facebook and other companies who run presto. There are numerous other contributors of course, many of them working within organisations that have deployed PrestoDB at scale.
What about other forks?
As an open source project, community members can download the source code and work on it in their own public or private repos. Those members can decide to contribute changes back through the traditional github development process of pull requests, reviews, and commits. If you starting anew, it is generally recommended to always pull source code from the master, mainline prestodb open source repo: https://github.com/prestodb/presto
Some members can decide to not contribute back and then that Presto version becomes a fork of the code. There are always a number of forks out in the community and as time goes on, the development tends to diverge away from the original codeline. The fork misses out on upstream changes and testing that companies like Facebook and others do, unless the fork is merged back with upstream.
What about PrestoSQL source code?
PrestoSQL is a fork of the original Presto project. It has a separate github repository here: https://github.com/prestosql/presto
PrestoDB is the main project of Linux Foundation’s Presto Foundation. That Foundation has a wide ranging set of industry members including Facebook, Uber, Twitter, Alibaba. In addition, Starburst is another industry member who has joined. As such, PrestoDB is the project repo of Presto both today and in the future.
How can I work with the Presto source code?
The easiest way is thru your own github account. If you don’t yet have a github account, it is free and easy to sign up. Then get to https://github.com/prestosql/presto and clone the repository into your github account. If you’d like to work off your laptop, you can use a wide variety of free tools, like atom or github desktop. Now you can get coding and compiling! Feel free join the PrestoDB slack channel to ask questions of the community (or answer questions too!). There is also the Presto Users google group at https://groups.google.com/g/presto-users and Presto developers are active on Stack Overflow https://stackoverflow.com/questions/tagged/presto
How can I contribute back to the PrestoDB source?
When you’re ready to contribute your code back to the community, you can use Github to raise pull request and get your code reviewed. You’ll need to e-sign a Contributor License Agreement (CLA) that is part of all Linux Foundation projects.
Note, that there are other ways to contribute back to the community. The code base is wide and varied, there’s opportunities to write or improve presto connectors, or other parts of the presto SQL engine. In addition to writing code, you could write documentation.
Now you know how to find the Presto source code and understand the different forks that are out there. Hope to see you in the community!