- Notifications
You must be signed in to change notification settings - Fork3.4k
Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
License
trinodb/trino
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Trino is a fast distributed SQL query engine for big data analytics.
See theUser Manual for deployment instructions and end user documentation.
SeeDEVELOPMENT for information about development and release process,code style and guidelines for implementors of Trino plugins.
SeeCONTRIBUTING for contribution requirements.
See the projectsecurity policy forinformation about reporting vulnerabilities.
Trino supportsreproducible builds as of version 449.
- Mac OS X or Linux
- Note that some npm packages used to build the web UI are only availablefor x86 architectures, so if you're building on Apple Silicon, you needto have Rosetta 2 installed
- Java 25.0.1+, 64-bit
- Docker
- Turn SELinux or other systems disabling write access to the local checkoutoff, to allow containers to mount parts of the Trino source tree
Trino is a standard Maven project. Simply run the following command from theproject root directory:
./mvnw clean install -DskipTestsOn the first build, Maven downloads all the dependencies from the internetand caches them in the local repository (~/.m2/repository), which can take awhile, depending on your connection speed. Subsequent builds are faster.
Trino has a comprehensive set of tests that take a considerable amount of timeto run, and are thus disabled by the above command. These tests are run by theCI system when you submit a pull request. We recommend only running testslocally for the areas of code that you change.
After building Trino for the first time, you can load the project into your IDEand run the server. We recommend usingIntelliJ IDEA. Because Trino is a standardMaven project, you easily can import it into your IDE. In IntelliJ, chooseOpen Project from theQuick Start box or chooseOpenfrom theFile menu and select the rootpom.xml file.
After opening the project in IntelliJ, double check that the Java SDK isproperly configured for the project:
- Open the File menu and select Project Structure
- In the SDKs section, ensure that JDK 24 is selected (create one if none exist)
- In the Project section, ensure the Project language level is set to 24
The simplest way to run Trino for development is to run theTpchQueryRunnerclass. It will start a development version of the server that is configured withthe TPCH connector. You can then use the CLI to execute queries against thisserver. Many other connectors have their own*QueryRunner class that you canuse when working on a specific connector.
Trino comes with sample configuration that should work out-of-the-box fordevelopment. Use the following options to create a run configuration:
- Main Class:
io.trino.server.DevelopmentServer - VM Options:
-ea -Dconfig=etc/config.properties -Dlog.levels-file=etc/log.properties -Djdk.attach.allowAttachSelf=true --sun-misc-unsafe-memory-access=allow --add-modules jdk.incubator.vector - Working directory:
$MODULE_DIR$ - Use classpath of module:
trino-server-dev
The working directory should be thetrino-server-dev subdirectory. InIntelliJ, using$MODULE_DIR$ accomplishes this automatically.
IfVM options doesn't exist in the dialog, you need to selectModify optionsand enableAdd VM options.
To adjust which plugins are enabled for the development server, adjust the value ofplugin.bundles inconfig.properties. Each entry in this list must represent a pluginspecified by one of the following options:
- A path to a
pom.xmlor*.pomfile describing a Maven project that produces a plugin. - Maven coordinates, in the form
<groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>. The plugin will be loaded via Maven and therefore must be available in your local repository or a remote repository. - A path to a plugin directory containing JAR files. SeeDeploying a custom plugin for more details.
If you want to use a plugin in a catalog, you must add a corresponding<catalog_name>.properties file totesting/trino-server-dev/etc/catalog.
Start the CLI to connect to the server and run SQL queries:
client/trino-cli/target/trino-cli-*-executable.jarRun a query to see the nodes in the cluster:
SELECT * FROM system.runtime.nodes;Run a query against the TPCH connector:
SELECT * FROM tpch.tiny.region;About
Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
Topics
Resources
License
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
