Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge evaluator work to partiql-eval branch #1362

Merged
merged 27 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
85e05e9
Use ANY as parameter for IS TYPE operators
rchowell Dec 20, 2023
dd28ee0
Generates PartiQL builtin stubs
rchowell Dec 21, 2023
eae4d8a
Initialize partiql-plugin.
rchowell Dec 21, 2023
f129381
Fix build
rchowell Dec 22, 2023
dd43328
Use SPECIFIC as implementation class name for builtins
rchowell Jan 4, 2024
c7466e4
Adds lt, lte, gt, gte, eq, not operators. (#1330)
rchowell Jan 5, 2024
9780eea
Adds logical operators
johnedquinn Jan 5, 2024
23528e3
Adds unary POS/NEG operators
johnedquinn Dec 22, 2023
7a65d61
Adds binary arithmetic operators
johnedquinn Dec 22, 2023
ec149e2
Adds concat operator
johnedquinn Dec 22, 2023
481dd89
Formats contributions
johnedquinn Jan 5, 2024
7cf19fa
Removes binary op helpers
johnedquinn Jan 5, 2024
b9b8b86
Adds IS TYPE and string builtin functions to PartiQL Plugin (#1326)
rchowell Jan 5, 2024
c5dae43
Merge pull request #1325 from partiql/operator-impls
johnedquinn Jan 5, 2024
390430e
add conformance reporting (#1333)
yliuuuu Jan 11, 2024
1dabd4e
Implements date_add builtin in partiql-eval (#1334)
yliuuuu Jan 12, 2024
57496a9
Partiql plugin cherrypick (#1349)
yliuuuu Jan 24, 2024
23961f3
Enable Eval Test Suites (#1340)
yliuuuu Jan 25, 2024
bf37c5c
Adds support for dynamic dispatch in eval
johnedquinn Jan 24, 2024
fdaad3f
Throws exception when exhausting dynamic dispatch candidates
johnedquinn Jan 25, 2024
101c19b
Adds a return statement
johnedquinn Jan 25, 2024
7155cb8
Adds support for PERMISSIVE vs STRICT
johnedquinn Jan 26, 2024
9e64c39
Reverts symbol read change
johnedquinn Jan 26, 2024
c16584f
Handles permissive/strict for function calls
johnedquinn Jan 26, 2024
f8cbeb8
Merges partiql-spi work into partiql-plugin-impl (#1360)
rchowell Feb 5, 2024
0b4dde5
Merge partiql-plugin-impl to partiql-eval
rchowell Feb 5, 2024
9ef9a87
Fix SubsumptionTest
rchowell Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions .github/workflows/conformance-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ on: [push, pull_request]

env:
PATH_TO_TEST_RUNNER: test/partiql-tests-runner
CONFORMANCE_REPORT_NAME: conformance_test_results.ion
CONFORMANCE_REPORT_RELATIVE_PATH: build/conformance-test-report
COMPARISON_REPORT_NAME: comparison_report.md
COMPARISON_REPORT_NAME_WITH_LIMIT: comparison_report_limited.md
COMMENT_SIZE_LIMIT: 10

jobs:
conformance-report:
Expand All @@ -13,6 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive
- name: Use Java 17
uses: actions/setup-java@v3
Expand All @@ -27,12 +30,12 @@ jobs:
# Run the conformance tests and save to an Ion file.
- name: gradle test of the conformance tests (can fail) and save to Ion file
continue-on-error: true
run: gradle :test:partiql-tests-runner:test --tests "*ConformanceTestReport" -PconformanceReport
run: gradle :test:partiql-tests-runner:generateTestReport
# Upload conformance report for future viewing and comparison with future runs.
- name: Upload `conformance_test_results.ion`
- name: Upload `conformance-test-report` folder
uses: actions/upload-artifact@v3
with:
path: ${{ env.PATH_TO_TEST_RUNNER }}/${{ env.CONFORMANCE_REPORT_NAME }}
path: ${{ env.PATH_TO_TEST_RUNNER }}/build/conformance-test-report
# Cache the conformance report for `conformance-report-comparison` job (pull_request event only)
- name: Cache conformance report and build
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -86,23 +89,34 @@ jobs:
continue-on-error: true
run: |
cd ${{ github.event.pull_request.base.sha }}
gradle :test:partiql-tests-runner:test --tests "*ConformanceTestReport" -PconformanceReport
gradle :test:partiql-tests-runner:generateTestReport
- name: (If download of target branch conformance report fails) Move conformance test report of target branch to ./artifact directory
if: ${{ steps.download-report.outcome == 'failure' }}
continue-on-error: true
run: |
mkdir -p $GITHUB_WORKSPACE/artifact
cp -r $GITHUB_WORKSPACE/${{ github.event.pull_request.base.sha }}/$PATH_TO_TEST_RUNNER/$CONFORMANCE_REPORT_NAME $GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_NAME
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
# Run conformance report comparison. Generates `comparison_report.md`
- name: Run conformance report comparison. Generates `comparison_report.md`
- name: Run conformance report comparison for artifact. Generates `comparison_report.md`
continue-on-error: true
run: |
ARGS="$GITHUB_WORKSPACE/artifact/$CONFORMANCE_REPORT_NAME $CONFORMANCE_REPORT_NAME ${{ github.event.pull_request.base.sha }} $GITHUB_SHA $COMPARISON_REPORT_NAME"
ARGS="$GITHUB_WORKSPACE/artifact $CONFORMANCE_REPORT_RELATIVE_PATH ${{ github.event.pull_request.base.sha }} $GITHUB_SHA $COMPARISON_REPORT_NAME"
gradle :test:partiql-tests-runner:run --args="$ARGS"
# Print conformance report to GitHub actions workflow summary page
- name: Print markdown in run
continue-on-error: true
run: cat $PATH_TO_TEST_RUNNER/$COMPARISON_REPORT_NAME >> $GITHUB_STEP_SUMMARY
# Upload the full comparison report to CI artifact
- name: Upload `comparison_report.md`
uses: actions/upload-artifact@v3
with:
path: ${{ env.PATH_TO_TEST_RUNNER }}/comparison_report.md
# Rebuild the test report with a size limit for comment
- name: Run conformance report comparison for comment. Generates `comparison_report_limited.md`
continue-on-error: true
run: |
ARGS="$GITHUB_WORKSPACE/artifact $CONFORMANCE_REPORT_RELATIVE_PATH ${{ github.event.pull_request.base.sha }} $GITHUB_SHA $COMPARISON_REPORT_NAME_WITH_LIMIT $COMMENT_SIZE_LIMIT"
gradle :test:partiql-tests-runner:run --args="$ARGS"
# Find comment w/ conformance comparison if previous comment published
- name: Find Comment
uses: peter-evans/find-comment@v2
Expand All @@ -119,5 +133,5 @@ jobs:
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-file: ${{ env.PATH_TO_TEST_RUNNER }}/${{ env.COMPARISON_REPORT_NAME }}
body-file: ${{ env.PATH_TO_TEST_RUNNER }}/${{ env.COMPARISON_REPORT_NAME_WITH_LIMIT }}
edit-mode: replace
28 changes: 25 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,27 @@ Thank you to all who have contributed!
## [Unreleased]

### Added
- Adds the ability to define a user-defined-function in ConnectorMetadata
- Move ConnectorMetadata map from PartiQLPlanner to PartiQLPlanner.Session for planner re-use.

### Changed

### Deprecated

### Fixed

### Removed

### Security

### Contributors
Thank you to all who have contributed!
- @<your-username>

## [0.14.1] - 2024-01-03

### Added
- Adds the ability to define a user-defined-function in `ConnectorMetadata`
- Move `ConnectorMetadata` map from `PartiQLPlanner` to `PartiQLPlanner.Session` for planner re-use.
- Deprecates 2 APIs in `org.partiql.planner.PartiQLPlannerBuilder` in favor of using the ConnectorMetadata map in `PartiQLPlanner.Session`.

### Changed

Expand All @@ -44,6 +63,8 @@ Thank you to all who have contributed!
### Contributors
Thank you to all who have contributed!
- @rchowell
- @johnedquinn
- @yliuuuu

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

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

[Unreleased]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.2-alpha...HEAD
[Unreleased]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.1...HEAD
[0.14.1]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.14.0-alpha...v0.14.1
[0.14.0-alpha]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.2-alpha...v0.14.0-alpha
[0.13.2-alpha]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.1-alpha...v0.13.2-alpha
[0.13.1-alpha]: https://github.com/partiql/partiql-lang-kotlin/compare/v0.13.0-alpha...v0.13.1-alpha
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ This project is published to [Maven Central](https://search.maven.org/artifact/o

| Group ID | Artifact ID | Recommended Version |
|---------------|-----------------------|---------------------|
| `org.partiql` | `partiql-lang-kotlin` | `0.14.0` |
| `org.partiql` | `partiql-lang-kotlin` | `0.14.1` |


For Maven builds, add the following to your `pom.xml`:
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=org.partiql
version=0.14.1-SNAPSHOT
version=0.14.2-SNAPSHOT

ossrhUsername=EMPTY
ossrhPassword=EMPTY
Expand Down
6 changes: 2 additions & 4 deletions partiql-cli/src/main/kotlin/org/partiql/cli/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import org.partiql.lang.eval.EvaluationSession
import org.partiql.parser.PartiQLParser
import org.partiql.plan.debug.PlanPrinter
import org.partiql.planner.PartiQLPlanner
import org.partiql.plugins.local.LocalConnector
import picocli.CommandLine
import java.io.PrintStream
import java.nio.file.Paths
Expand Down Expand Up @@ -72,9 +71,8 @@ object Debug {
val sess = PartiQLPlanner.Session(
queryId = UUID.randomUUID().toString(),
userId = "debug",
catalogs = mapOf(
"local" to LocalConnector.Metadata(root)
)
currentCatalog = "default",
catalogs = emptyMap(),
)
val result = planner.plan(statement, sess).plan
out.info("-- Plan ----------")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import org.partiql.cli.functions.ReadFile_1
import org.partiql.cli.functions.ReadFile_2
import org.partiql.cli.functions.WriteFile_1
import org.partiql.cli.functions.WriteFile_2
import org.partiql.cli.utils.ServiceLoaderUtil
import org.partiql.lang.CompilerPipeline
import org.partiql.lang.compiler.PartiQLCompilerBuilder
import org.partiql.lang.compiler.PartiQLCompilerPipeline
Expand Down Expand Up @@ -84,7 +83,7 @@ internal sealed class AbstractPipeline(open val options: PipelineOptions) {
WriteFile_1(ion),
WriteFile_2(ion),
QueryDDB(ion)
) + ServiceLoaderUtil.loadFunctions(pluginPath)
)
val parser = PartiQLParserBuilder().build()
return PipelineOptions(
pipeline,
Expand Down
Loading
Loading