Skip to content

Commit

Permalink
Type-safe filter predicates (#15)
Browse files Browse the repository at this point in the history
* Initial work on type-safe filter predicates

* Save filter progress #1

* Support overriding typeTag derivers

* Fix compilation errors for scala 2.13 and 3

* Filter.not, trying to fix codec tests for offset date times

* Add in/notIn Filter operators

* Fix logical predicate types

* Fix ExprSpec cross-compilation

* Add test case for Expr path & optional TypeTag

* Add "compile summoned" TypeTag test case

* Support for all primitive types

* Add simple test for all primitive types

* Deduplicate scala 2.13 and 3 test Fixtures

* Implement TypeTag enum deriver

* Support option fields (WIP)

* Support option fields - nullable column syntax

* Add compileImpl (scala 2) to emit compile time error when an optional column is being used in a filter predicate

* WIP - working on macro to validate path construction

* WIP - make concat macro work in scala 2

* Finish polishing concatImpl for scala 2.13

* Refactor test case for primitive types

* Disable concat macro for scala 2.12

* Add compileImpl macro for Scala 3

* Fix compileImpl macro for Scala 3

* Add fmtAll command alias

* Fix compileImpl macro for Scala 2

* Fix compileImpl macro for Scala 3 again

* Get rid of Java 8

* Add concatImpl macro for Scala 3

* Regenerate ci workflow

* Reworking compileImpl macro (WIP)

* Give up on idea to compile predicate at compile time, sanitizing optionals is enough

* fmtAll

* regenerate ci.yaml

* Improve testing of predicate in IO spec

* Improve Filter.not syntax

* Refactor .predicate macro methods

* Update docs

* clean up some commented code

---------

Co-authored-by: Michael Nedokushev <[email protected]>
  • Loading branch information
grouzen and Michael Nedokushev authored Aug 31, 2024
1 parent 559525a commit dded406
Show file tree
Hide file tree
Showing 37 changed files with 2,289 additions and 245 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.19, 2.13.14, 3.5.0]
scala: [2.13.14, 3.5.0]
java: [temurin@11, temurin@17]
runs-on: ${{ matrix.os }}
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ private/
.metals/
.vscode/
metals.sbt
.scala-build
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ spaces {
inImportCurlyBraces = true
}
optIn.annotationNewlines = true
runner.dialect = scala213
runner.dialect = scala3
rewrite.rules = [SortImports, RedundantBraces]
Loading

0 comments on commit dded406

Please sign in to comment.