Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wyy566/presto-1
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: prestodb/presto
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
Loading
Showing 8,360 changed files with 884,445 additions and 270,475 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
87 changes: 87 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
AccessModifierOffset: -1
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: true
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros: [ FOR_EACH, FOR_EACH_ENUMERATE, FOR_EACH_KV, FOR_EACH_R, FOR_EACH_RANGE, ]
IncludeCategories:
- Regex: '^<.*\.h(pp)?>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IndentCaseLabels: true
IndentWidth: 2
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 8
UseTab: Never
...
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Open a Bug
about: Create a bug report
labels: bug
assignees: ''

---

<!--- Provide a general summary of the issue in the Title above -->
<!--- Look through existing open and closed issues to see if someone has reported the issue before -->

## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Presto version used:
* Storage (HDFS/S3/GCS..):
* Data source and connector used:
* Deployment (Cloud or On-prem):
* [Pastebin](https://pastebin.com/) link to the complete debug logs:

## Expected Behavior
<!--- Tell us what should happen -->

## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug or a workaround -->

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.

## Screenshots (if appropriate)

## Context
<!--- How has this issue affected you? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->

6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

blank_issues_enabled: false
contact_links:
- name: Slack Support
url: https://prestodb.io/slack
about: Join the Presto Slack Channel to engage in conversations and get faster support.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Feature Request
about: Create a feature request
labels: 'feature request'
assignees: ''

---

<!--- Provide a general summary of the feature request or improvement in the Title above -->
<!--- Look through existing open and closed feature proposals to see if someone has asked for the feature before -->

## Expected Behavior or Use Case
<!--- Tell us how it should work -->

## Presto Component, Service, or Connector
<!--- Tell us to which service or component this request is related to -->

## Possible Implementation
<!--- Not obligatory, suggest ideas of how to implement the addition or change -->

## Example Screenshots (if appropriate):

## Context
<!--- Why do you need this feature or improvement? What is your use case? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/usage-question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Usage Question
about: Report an issue faced while using Presto
labels: usage

---
<!--Tips before filing an issue -->
<!-- Join the Presto Slack Channel to engage in conversations and get faster support at https://https://prestodb.io/slack. -->
<!-- If you have triaged this as a bug, then file an [BUG](https://github.com/prestodb/presto/issues/new/choose) directly. -->

## Describe the problem you faced

* A clear and concise description of the problem.
* Was this working before or is this a first try?
* If this worked before, then what has changed that recently?
* Provide table DDLs and `` EXPLAIN ANALYZE `` for your Presto queries.

## Environment Description

* Presto version used:
* Storage (HDFS/S3/GCS..):
* Data source and connectors or catalogs used:
* Deployment (Cloud or On-prem):
* [Pastebin](https://pastebin.com/) link to the complete debug logs:

## Steps To Reproduce

Steps to reproduce the behavior:
1.
2.
3.
4.

## Expected behavior

<!--- A clear and concise description of what you expected to happen.-->


## Additional context

<!--- Add any other context about the problem here. What is your use case? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world.-->

## Stacktrace

<!---Add the complete stacktrace of the error.-->
93 changes: 93 additions & 0 deletions .github/bin/download_nodejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#!/usr/bin/env bash

set -euo pipefail

NODE_VERSION="18.20.2"
YARN_VERSION="1.22.22"

wget_retry() {
local max=$1; shift;
local interval=$1; shift;
local dest=$1; shift;
local src=$1; shift;
local check=$1; shift;

fileList=$(mktemp)
until wget -q -O "${dest}" "${src}" && tar -tf "${dest}" > "$fileList" && grep -q "${check}" "${fileList}" ; do
max=$((max-1))
if [[ "$max" -eq 0 ]]; then
return 1
fi
sleep "$interval"
done

return 0
}

# GH action variables: https://docs.github.com/en/actions/learn-github-actions/variables
# Use the RUNNER_OS variable to get the os string for the download file
get_os() {
case "${RUNNER_OS}" in
Linux) echo "linux" ;;
macOS) echo "darwin" ;;
Windows) echo "win" ;;
*) echo "unknown" ;;
esac
}

# Use the RUNNER_ARCH variable to get the arch string for the download file
get_arch() {
case "${RUNNER_ARCH}" in
X86) echo "x86" ;;
X64) echo "x64" ;;
ARM) echo "armv7l" ;;
ARM64) echo "arm64" ;;
*) echo "unknown" ;;
esac
}

download_node() {
if [[ -a "${HOME}/.m2/repository/com/github/eirslett/node/${NODE_VERSION}/node-${NODE_VERSION}-${NODE_OS}-${NODE_ARCH}.tar.gz" ]]; then
echo "Node binary exists. Skipped download"
return 0
fi

if ! wget_retry 3 10 "${HOME}/.m2/repository/com/github/eirslett/node/${NODE_VERSION}/node-${NODE_VERSION}-${NODE_OS}-${NODE_ARCH}.tar.gz" \
"https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-${NODE_OS}-${NODE_ARCH}.tar.gz" "node"; then
rm "${HOME}/.m2/repository/com/github/eirslett/node/${NODE_VERSION}/node-${NODE_VERSION}-${NODE_OS}-${NODE_ARCH}.tar.gz"
return 1
fi
}

download_yarn() {
if [[ -a "${HOME}/.m2/repository/com/github/eirslett/yarn/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz" ]]; then
echo "Yarn binary exists. Skipped download"
return 0
fi

if ! wget_retry 3 10 "${HOME}/.m2/repository/com/github/eirslett/yarn/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz" \
"https://github.com/yarnpkg/yarn/releases/download/v${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz" "yarn"; then
rm "${HOME}/.m2/repository/com/github/eirslett/yarn/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz"
return 1
fi
}

NODE_OS=$(get_os)
NODE_ARCH=$(get_arch)

mkdir -p "${HOME}/.m2/repository/com/github/eirslett/node/${NODE_VERSION}"
mkdir -p "${HOME}/.m2/repository/com/github/eirslett/yarn/${YARN_VERSION}"

if download_node; then
echo "node-v${NODE_VERSION}-${NODE_OS}-${NODE_ARCH}.tar.gz is ready for use"
else
echo "failed to download node binary"
exit 1
fi

if download_yarn; then
echo "yarn-v${YARN_VERSION}.tar.gz is ready for use"
else
echo "failed to download yarn binary"
exit 1
fi
21 changes: 21 additions & 0 deletions .github/bin/retry
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -euo pipefail

x() {
echo "+ $*" >&2
"$@"
}

max_retry_time_seconds=$(( 30 * 60 ))
retry_delay_seconds=10

END=$(( $(date +%s) + ${max_retry_time_seconds} ))

while (( $(date +%s) < $END )); do
x "$@" && exit 0
sleep "${retry_delay_seconds}"
done

echo "$0: retrying [$*] timed out" >&2
exit 1
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docs:
- all: ['**/*.rst']
53 changes: 53 additions & 0 deletions .github/workflows/arrow-flight-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: arrow flight tests

on:
pull_request:
paths-ignore:
- 'presto-docs/**'

env:
CONTINUOUS_INTEGRATION: true
MAVEN_OPTS: "-Xmx1024M -XX:+ExitOnOutOfMemoryError"
MAVEN_INSTALL_OPTS: "-Xmx2G -XX:+ExitOnOutOfMemoryError"
MAVEN_FAST_INSTALL: "-B -V --quiet -T 1C -DskipTests -Dair.check.skip-all --no-transfer-progress -Dmaven.javadoc.skip=true"
MAVEN_TEST: "-B -Dair.check.skip-all -Dmaven.javadoc.skip=true -DLogTestDurationListener.enabled=true --no-transfer-progress --fail-at-end"
RETRY: .github/bin/retry

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
modules:
- ":presto-base-arrow-flight" # Only run tests for the `presto-base-arrow-flight` module

timeout-minutes: 80
concurrency:
group: ${{ github.workflow }}-test-${{ matrix.modules }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

steps:
# Checkout the code only if there are changes in the relevant files
- uses: actions/checkout@v4
with:
show-progress: false

# Set up Java and dependencies for the build environment
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
cache: 'maven'
- name: Download nodejs to maven cache
run: .github/bin/download_nodejs

# Install dependencies for the target module
- name: Maven Install
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
./mvnw install ${MAVEN_FAST_INSTALL} -am -pl ${{ matrix.modules }}
# Run Maven tests for the target module
- name: Maven Tests
run: ./mvnw test ${MAVEN_TEST} -pl ${{ matrix.modules }}
Loading