Skip to content

Commit 0b4dde5

Browse files
committed
Merge partiql-plugin-impl to partiql-eval
2 parents bb0342d + f8cbeb8 commit 0b4dde5

File tree

239 files changed

+18492
-13620
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+18492
-13620
lines changed

.github/workflows/conformance-report.yml

+23-9
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ on: [push, pull_request]
33

44
env:
55
PATH_TO_TEST_RUNNER: test/partiql-tests-runner
6-
CONFORMANCE_REPORT_NAME: conformance_test_results.ion
6+
CONFORMANCE_REPORT_RELATIVE_PATH: build/conformance-test-report
77
COMPARISON_REPORT_NAME: comparison_report.md
8+
COMPARISON_REPORT_NAME_WITH_LIMIT: comparison_report_limited.md
9+
COMMENT_SIZE_LIMIT: 10
810

911
jobs:
1012
conformance-report:
@@ -13,6 +15,7 @@ jobs:
1315
steps:
1416
- uses: actions/checkout@v3
1517
with:
18+
ref: ${{ github.event.pull_request.head.sha }}
1619
submodules: recursive
1720
- name: Use Java 17
1821
uses: actions/setup-java@v3
@@ -27,12 +30,12 @@ jobs:
2730
# Run the conformance tests and save to an Ion file.
2831
- name: gradle test of the conformance tests (can fail) and save to Ion file
2932
continue-on-error: true
30-
run: gradle :test:partiql-tests-runner:test --tests "*ConformanceTestReport" -PconformanceReport
33+
run: gradle :test:partiql-tests-runner:generateTestReport
3134
# Upload conformance report for future viewing and comparison with future runs.
32-
- name: Upload `conformance_test_results.ion`
35+
- name: Upload `conformance-test-report` folder
3336
uses: actions/upload-artifact@v3
3437
with:
35-
path: ${{ env.PATH_TO_TEST_RUNNER }}/${{ env.CONFORMANCE_REPORT_NAME }}
38+
path: ${{ env.PATH_TO_TEST_RUNNER }}/build/conformance-test-report
3639
# Cache the conformance report for `conformance-report-comparison` job (pull_request event only)
3740
- name: Cache conformance report and build
3841
if: github.event_name == 'pull_request'
@@ -86,23 +89,34 @@ jobs:
8689
continue-on-error: true
8790
run: |
8891
cd ${{ github.event.pull_request.base.sha }}
89-
gradle :test:partiql-tests-runner:test --tests "*ConformanceTestReport" -PconformanceReport
92+
gradle :test:partiql-tests-runner:generateTestReport
9093
- name: (If download of target branch conformance report fails) Move conformance test report of target branch to ./artifact directory
9194
if: ${{ steps.download-report.outcome == 'failure' }}
9295
continue-on-error: true
9396
run: |
9497
mkdir -p $GITHUB_WORKSPACE/artifact
95-
cp -r $GITHUB_WORKSPACE/${{ github.event.pull_request.base.sha }}/$PATH_TO_TEST_RUNNER/$CONFORMANCE_REPORT_NAME $GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_NAME
98+
cp -r $GITHUB_WORKSPACE/${{ github.event.pull_request.base.sha }}/$PATH_TO_TEST_RUNNER/$CONFORMANCE_REPORT_RELATIVE_PATH $GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_RELATIVE_PATH
9699
# Run conformance report comparison. Generates `comparison_report.md`
97-
- name: Run conformance report comparison. Generates `comparison_report.md`
100+
- name: Run conformance report comparison for artifact. Generates `comparison_report.md`
98101
continue-on-error: true
99102
run: |
100-
ARGS="$GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_NAME $CONFORMANCE_REPORT_NAME ${{ github.event.pull_request.base.sha }} $GITHUB_SHA $COMPARISON_REPORT_NAME"
103+
ARGS="$GITHUB_WORKSPACE/artifact $CONFORMANCE_REPORT_RELATIVE_PATH ${{ github.event.pull_request.base.sha }} $GITHUB_SHA $COMPARISON_REPORT_NAME"
101104
gradle :test:partiql-tests-runner:run --args="$ARGS"
102105
# Print conformance report to GitHub actions workflow summary page
103106
- name: Print markdown in run
104107
continue-on-error: true
105108
run: cat $PATH_TO_TEST_RUNNER/$COMPARISON_REPORT_NAME >> $GITHUB_STEP_SUMMARY
109+
# Upload the full comparison report to CI artifact
110+
- name: Upload `comparison_report.md`
111+
uses: actions/upload-artifact@v3
112+
with:
113+
path: ${{ env.PATH_TO_TEST_RUNNER }}/comparison_report.md
114+
# Rebuild the test report with a size limit for comment
115+
- name: Run conformance report comparison for comment. Generates `comparison_report_limited.md`
116+
continue-on-error: true
117+
run: |
118+
ARGS="$GITHUB_WORKSPACE/artifact $CONFORMANCE_REPORT_RELATIVE_PATH ${{ github.event.pull_request.base.sha }} $GITHUB_SHA $COMPARISON_REPORT_NAME_WITH_LIMIT $COMMENT_SIZE_LIMIT"
119+
gradle :test:partiql-tests-runner:run --args="$ARGS"
106120
# Find comment w/ conformance comparison if previous comment published
107121
- name: Find Comment
108122
uses: peter-evans/find-comment@v2
@@ -119,5 +133,5 @@ jobs:
119133
with:
120134
comment-id: ${{ steps.fc.outputs.comment-id }}
121135
issue-number: ${{ github.event.pull_request.number }}
122-
body-file: ${{ env.PATH_TO_TEST_RUNNER }}/${{ env.COMPARISON_REPORT_NAME }}
136+
body-file: ${{ env.PATH_TO_TEST_RUNNER }}/${{ env.COMPARISON_REPORT_NAME_WITH_LIMIT }}
123137
edit-mode: replace

CHANGELOG.md

+25-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,27 @@ Thank you to all who have contributed!
2828
## [Unreleased]
2929

3030
### Added
31-
- Adds the ability to define a user-defined-function in ConnectorMetadata
32-
- Move ConnectorMetadata map from PartiQLPlanner to PartiQLPlanner.Session for planner re-use.
31+
32+
### Changed
33+
34+
### Deprecated
35+
36+
### Fixed
37+
38+
### Removed
39+
40+
### Security
41+
42+
### Contributors
43+
Thank you to all who have contributed!
44+
- @<your-username>
45+
46+
## [0.14.1] - 2024-01-03
47+
48+
### Added
49+
- Adds the ability to define a user-defined-function in `ConnectorMetadata`
50+
- Move `ConnectorMetadata` map from `PartiQLPlanner` to `PartiQLPlanner.Session` for planner re-use.
51+
- Deprecates 2 APIs in `org.partiql.planner.PartiQLPlannerBuilder` in favor of using the ConnectorMetadata map in `PartiQLPlanner.Session`.
3352

3453
### Changed
3554

@@ -44,6 +63,8 @@ Thank you to all who have contributed!
4463
### Contributors
4564
Thank you to all who have contributed!
4665
- @rchowell
66+
- @johnedquinn
67+
- @yliuuuu
4768

4869
## [0.14.0-alpha] - 2023-12-15
4970

@@ -948,7 +969,8 @@ breaking changes if migrating from v0.9.2. The breaking changes accidentally int
948969
### Added
949970
Initial alpha release of PartiQL.
950971

951-
[Unreleased]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.2-alpha...HEAD
972+
[Unreleased]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.1...HEAD
973+
[0.14.1]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.0-alpha...v0.14.1
952974
[0.14.0-alpha]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.2-alpha...v0.14.0-alpha
953975
[0.13.2-alpha]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.1-alpha...v0.13.2-alpha
954976
[0.13.1-alpha]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.0-alpha...v0.13.1-alpha

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This project is published to [Maven Central](https://search.maven.org/artifact/o
3131

3232
| Group ID | Artifact ID | Recommended Version |
3333
|---------------|-----------------------|---------------------|
34-
| `org.partiql` | `partiql-lang-kotlin` | `0.14.0` |
34+
| `org.partiql` | `partiql-lang-kotlin` | `0.14.1` |
3535

3636

3737
For Maven builds, add the following to your `pom.xml`:

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=org.partiql
2-
version=0.14.1-SNAPSHOT
2+
version=0.14.2-SNAPSHOT
33

44
ossrhUsername=EMPTY
55
ossrhPassword=EMPTY

partiql-cli/src/main/kotlin/org/partiql/cli/Main.kt

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import org.partiql.lang.eval.EvaluationSession
2323
import org.partiql.parser.PartiQLParser
2424
import org.partiql.plan.debug.PlanPrinter
2525
import org.partiql.planner.PartiQLPlanner
26-
import org.partiql.plugins.local.LocalConnector
2726
import picocli.CommandLine
2827
import java.io.PrintStream
2928
import java.nio.file.Paths
@@ -72,9 +71,8 @@ object Debug {
7271
val sess = PartiQLPlanner.Session(
7372
queryId = UUID.randomUUID().toString(),
7473
userId = "debug",
75-
catalogs = mapOf(
76-
"local" to LocalConnector.Metadata(root)
77-
)
74+
currentCatalog = "default",
75+
catalogs = emptyMap(),
7876
)
7977
val result = planner.plan(statement, sess).plan
8078
out.info("-- Plan ----------")

partiql-cli/src/main/kotlin/org/partiql/cli/pipeline/AbstractPipeline.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import org.partiql.cli.functions.ReadFile_1
2727
import org.partiql.cli.functions.ReadFile_2
2828
import org.partiql.cli.functions.WriteFile_1
2929
import org.partiql.cli.functions.WriteFile_2
30-
import org.partiql.cli.utils.ServiceLoaderUtil
3130
import org.partiql.lang.CompilerPipeline
3231
import org.partiql.lang.compiler.PartiQLCompilerBuilder
3332
import org.partiql.lang.compiler.PartiQLCompilerPipeline
@@ -84,7 +83,7 @@ internal sealed class AbstractPipeline(open val options: PipelineOptions) {
8483
WriteFile_1(ion),
8584
WriteFile_2(ion),
8685
QueryDDB(ion)
87-
) + ServiceLoaderUtil.loadFunctions(pluginPath)
86+
)
8887
val parser = PartiQLParserBuilder().build()
8988
return PipelineOptions(
9089
pipeline,

0 commit comments

Comments
 (0)