Skip to content

Commit

Permalink
Apply client request filter plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
SthuthiGhosh9400 committed Oct 16, 2024
1 parent 580988b commit d144a6f
Show file tree
Hide file tree
Showing 830 changed files with 23,721 additions and 6,903 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ workflows:
# <regex path-to-test> <parameter-to-set> <value-of-pipeline-parameter>
mapping: |
presto-native-execution/.* run_native_specific_jobs true
(?!presto-docs).*(?<!.md) run_linux_tests true
base-revision: master
config-path: .circleci/continue_config.yml
8 changes: 4 additions & 4 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ parameters:
default: false
run_linux_tests:
type: boolean
default: true
default: false

workflows:
version: 2
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
parameters:
run_linux_tests:
type: boolean
default: true
default: false
steps:
- run: echo "Run Linux tests is << parameters.run_linux_tests >>"
- when:
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
parameters:
run_linux_tests:
type: boolean
default: true
default: false
parallelism: 5
steps:
- run: echo "Run Linux tests is << parameters.run_linux_tests >>"
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
parameters:
run_linux_tests:
type: boolean
default: true
default: false
parallelism: 5
steps:
- run: echo "Run Linux tests is << parameters.run_linux_tests >>"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:
- name: Maven Checks
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
./mvnw install -B -V -T 1C -DskipTests -Dmaven.javadoc.skip=true --no-transfer-progress -P ci -pl '!presto-test-coverage,!:presto-server,!:presto-docs'
./mvnw install -B -V -T 1C -DskipTests -Dmaven.javadoc.skip=true --no-transfer-progress -P ci -pl '!presto-test-coverage,!:presto-docs'
- name: Clean Maven Output
run: ./mvnw clean -pl '!:presto-server,!:presto-cli,!presto-test-coverage'
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ dependency-reduced-pom.xml
test-output/
test-reports/
/atlassian-ide-plugin.xml
.idea
.idea/*
*/.idea
!.idea/icon.png
.run
.vscode
.DS_Store
Expand Down Expand Up @@ -38,6 +40,8 @@ cmake-build-*/
*.swp
*~
a.out
presto-native-execution/deps-download
presto-native-execution/deps-install

# Compiled Object files
*.slo
Expand All @@ -58,3 +62,7 @@ a.out
*.pb.h
*.pb.cc
*_pb2.py

# Compiled executables used for docker build
/docker/presto-cli-*-executable.jar
/docker/presto-server-*.tar.gz
Binary file added .idea/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,5 @@ CODEOWNERS @prestodb/team-tsc
# Presto documentation
/presto-docs @steveburnett @elharo @prestodb/committers
/**/*.md @steveburnett @prestodb/committers
/presto-docs/src/**/connector/iceberg.rst @steveburnett @elharo @hantangwangd @ZacBlanco @prestodb/committers

2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Contributions should have an associated GitHub issue.
* Large changes should have an [RFC](https://github.com/prestodb/rfcs). The [RFC](https://github.com/prestodb/rfcs) should be reviewed before patches are submitted.
* Medium size changes should have an issue. Work from RFCs can be broken down into smaller issues, and those smaller issues should link to the RFC.
* Smaller changes, such as minor bug fixes and code formatting, may not need an issue and can submit a PR without one.
* New SQL functions should follow the [Presto function guidelines](https://github.com/prestodb/presto/blob/master/FUNCTIONS.md).

## Minimum Expectations for Contributing to Presto
To commit code, you should:
Expand Down Expand Up @@ -81,6 +82,7 @@ To commit code, you should:
1. User friendliness
1. Config options have names and descriptions that can be understood by someone configuring Presto
1. All new language features, new functions, and major features have documentation added
1. When adding a new method to [Plugin.java](https://github.com/prestodb/presto/blob/master/presto-spi/src/main/java/com/facebook/presto/spi/Plugin.java), include documentation for the new method in the [Presto Developer Guide](https://prestodb.io/docs/current/develop.html).
1. Release notes following the [Release Note Guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) are added for user visible changes
* For large features, discuss your design with relevant code owners before you start implementing it.

Expand Down
29 changes: 29 additions & 0 deletions FUNCTIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Presto Function Guidelines

Presto includes a large library of built-in SQL functions such as AVG and CONCAT that are available in every deployment.

Presto also supports plugins that provide extension functions that are not available by default but can be installed in particular deployments. Examples include the [I18nMyanmarFunctions](https://github.com/prestodb/presto/blob/master/presto-i18n-functions/src/main/java/com/facebook/presto/i18n/functions/I18nMyanmarFunctions.java) for working with Zawgyi encoded text. If Burmese text is present in your data store, these can be important, but more Presto installations don't need this than do.

Finally, Presto allows users to write user defined functions (UDFs) in either Java or SQL that are not stored in this GitHub repository. This is done through the [Plugin SPI](https://prestodb.io/docs/current/develop/functions.html).

This document lays out some guidelines for which category is right for which functions.

Functions defined in [ANSI SQL](https://jakewheat.github.io/sql-overview/) should be built-in functions in this repository.

Non-standard functions that are commonly available in multiple other SQL dialects such as MySQL and Postgres can also be written as built-in functions in this library.

Functions that are provided in order to mirror the syntax and semantics of particular other SQL dialects (MySQL, Postgres, Oracle, etc.) should be extension functions so they can be turned on by users who need compatibility with that dialect while everyone else can safely ignore them. This helps avoid conflicts where two existing dialects are incompatible. The [Teradata plugin](https://github.com/prestodb/presto/tree/master/presto-teradata-functions/src/main/java/com/facebook/presto/teradata) is a good example of this.

Functions that alias or closely resemble existing built-in functions should not be built-in functions and usually should not be extension functions either. For example, because Presto already has an AVG function, it should not also have a MEAN or an AVERAGE function, even if the semantics or arguments are slightly different. However, extension functions whose purpose is to mirror other SQL dialects may occasionally alias functions. For instance, the Teradata plugin provides an index() function that is an alias for Presto's built-in strpos() function. This is purely for compatibility with existing Teradata SQL and should be invisible to users who have not deliberately chosen to install the Teradata plugin.

Built-in functions should be broadly applicable to many users in different areas. For example,
functions that work with pre-decimalization English currency — pounds, shillings, pence, etc. — would be unlikely to be needed by many users, and thus should be extension functions or UDFs.

Built-in functions should be purely computational. That is, they do not make network connections or perform I/O outside the database. (Date/time functions like NOW() are an exception.) For example, a function that talks to a remote server to check the current temperature or a stock price should not be a built-in function. This should be a user defined function maintained outside the Presto GitHub repository.

Built-in and extension functions should be able to be maintained by Presto committers without support from the original contributors. That is, they should not require specialized or expert knowledge beyond what Presto maintenance already requires. For instance, most cryptographic functions should not be included in this repository because it is not reasonable to expect that Presto committers are also cryptography experts.

Built-in functions that extend Presto into new domains should have a detailed plan and ideally an implementation for a library of functions that cover the domain. For instance, a function that only added US dollars would not be accepted. However, a general library for working with currency data along the lines of [Joda-Money](https://www.joda.org/joda-money/) could be considered. It can be helpful to prototype complex functionality like this in UDFs before writing an RFC and submitting it to the Presto project.

Built-in and extension functions bundled with Presto must be freely available without fee and compatible with the Apache License Version 2.0. Functions using algorithms that are in any way restricted by copyright, patent, trademark, field of use, or other reasons will not be included in this repository. For instance, a patented video CODEC cannot be used. Functions that include trademarked names should be UDFs outside this repository.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ resources will be hot-reloaded and changes are reflected on browser refresh.

[Velox](https://github.com/facebookincubator/velox) is a C++ database library which provides reusable, extensible, and high-performance data processing components.

Check out [building instructions](https://github.com/prestodb/presto/tree/master/presto-native-execution#building) to get started.
Check out [building instructions](https://github.com/prestodb/presto/tree/master/presto-native-execution#build-from-source) to get started.


<hr>
Expand Down
82 changes: 64 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.289-SNAPSHOT</version>
<version>0.290-SNAPSHOT</version>
<packaging>pom</packaging>

<name>presto-root</name>
Expand Down Expand Up @@ -44,7 +44,7 @@
<air.maven.version>3.3.9</air.maven.version>

<dep.antlr.version>4.7.1</dep.antlr.version>
<dep.airlift.version>0.209</dep.airlift.version>
<dep.airlift.version>0.215</dep.airlift.version>
<dep.packaging.version>${dep.airlift.version}</dep.packaging.version>
<dep.slice.version>0.38</dep.slice.version>
<dep.testing-mysql-server-5.version>0.6</dep.testing-mysql-server-5.version>
Expand All @@ -59,9 +59,10 @@
<dep.tempto.version>1.53</dep.tempto.version>
<dep.testng.version>7.5</dep.testng.version>
<dep.assertj-core.version>3.8.0</dep.assertj-core.version>
<dep.logback.version>1.2.13</dep.logback.version>
<dep.parquet.version>1.13.1</dep.parquet.version>
<dep.nexus-staging-plugin.version>1.6.8</dep.nexus-staging-plugin.version>
<dep.asm.version>9.0</dep.asm.version>
<dep.asm.version>9.2</dep.asm.version>
<dep.gcs.version>1.9.17</dep.gcs.version>
<dep.alluxio.version>313</dep.alluxio.version>
<dep.slf4j.version>1.7.32</dep.slf4j.version>
Expand All @@ -78,6 +79,9 @@
<dep.guava.version>32.1.0-jre</dep.guava.version>
<dep.jackson.version>2.11.0</dep.jackson.version>
<dep.j2objc.version>2.8</dep.j2objc.version>
<dep.avro.version>1.11.3</dep.avro.version>
<dep.commons.compress.version>1.23.0</dep.commons.compress.version>

<!--
America/Bahia_Banderas has:
- offset change since 1970 (offset Jan 1970: -08:00, offset Jan 2018: -06:00)
Expand Down Expand Up @@ -195,6 +199,7 @@
<module>redis-hbo-provider</module>
<module>presto-singlestore</module>
<module>presto-hana</module>
<module>presto-openapi</module>
</modules>

<dependencyManagement>
Expand Down Expand Up @@ -1222,7 +1227,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.6.0</version>
<version>42.6.1</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -2122,18 +2127,6 @@
</exclusions>
</dependency>

<dependency>
<groupId>com.facebook.presto.cassandra</groupId>
<artifactId>cassandra-driver</artifactId>
<version>3.6.0-1</version>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-delta</artifactId>
Expand Down Expand Up @@ -2256,6 +2249,29 @@
<version>${dep.j2objc.version}</version>
</dependency>

<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>${dep.avro.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${dep.commons.compress.version}</version>
</dependency>

<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>3.11.5</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -2353,7 +2369,8 @@
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${dep.nexus-staging-plugin.version}</version>
<extensions>true</extensions>
<!-- This plugin is not registered as an extension because it will fail to activate
concurrently with the Maven Provisio plugin, as that has its own deployment lifecycle -->
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
Expand Down Expand Up @@ -2382,6 +2399,13 @@
<artifactId>presto-maven-plugin</artifactId>
</plugin>

<plugin>
<groupId>ca.vanzyl.provisio.maven.plugins</groupId>
<artifactId>provisio-maven-plugin</artifactId>
<version>1.0.18</version>
<extensions>true</extensions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down Expand Up @@ -2561,14 +2585,36 @@
<id>deploy-to-ossrh</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<!-- This plugin must be configured manually ("Maven 2" style in the docs) due to the usage of the
Maven Provisio plugin, which includes its own deployment lifecycle -->
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.2.4</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down
2 changes: 1 addition & 1 deletion presto-accumulo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.289-SNAPSHOT</version>
<version>0.290-SNAPSHOT</version>
</parent>

<artifactId>presto-accumulo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-analyzer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.289-SNAPSHOT</version>
<version>0.290-SNAPSHOT</version>
</parent>

<artifactId>presto-analyzer</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-atop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.289-SNAPSHOT</version>
<version>0.290-SNAPSHOT</version>
</parent>

<artifactId>presto-atop</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-base-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.289-SNAPSHOT</version>
<version>0.290-SNAPSHOT</version>
</parent>

<artifactId>presto-base-jdbc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-benchmark-driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.289-SNAPSHOT</version>
<version>0.290-SNAPSHOT</version>
</parent>

<artifactId>presto-benchmark-driver</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-benchmark-runner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>presto-root</artifactId>
<groupId>com.facebook.presto</groupId>
<version>0.289-SNAPSHOT</version>
<version>0.290-SNAPSHOT</version>
</parent>

<artifactId>presto-benchmark-runner</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-benchmark/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>presto-root</artifactId>
<groupId>com.facebook.presto</groupId>
<version>0.289-SNAPSHOT</version>
<version>0.290-SNAPSHOT</version>
</parent>

<artifactId>presto-benchmark</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion presto-benchto-benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-root</artifactId>
<version>0.289-SNAPSHOT</version>
<version>0.290-SNAPSHOT</version>
</parent>

<artifactId>presto-benchto-benchmarks</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import com.facebook.presto.spi.ConnectorTableHandle;
import com.facebook.presto.spi.plan.AggregationNode;
import com.facebook.presto.spi.plan.JoinDistributionType;
import com.facebook.presto.spi.plan.Partitioning;
import com.facebook.presto.spi.plan.TableScanNode;
import com.facebook.presto.spi.plan.ValuesNode;
import com.facebook.presto.sql.planner.assertions.BasePlanTest;
Expand Down
Loading

0 comments on commit d144a6f

Please sign in to comment.