Skip to content

Releases: PRQL/prql

0.10.0

26 Oct 20:02
4eb55bf
Compare
Choose a tag to compare

0.10.0 contains lots of small improvements, including support for new types of literal notation, support for read_* functions in more dialects, playground improvements, and a better Lezer grammar (which we're planning on using for a Jupyter extension).

This release has 155 commits from 9 contributors. Selected changes:

Language:

  • Breaking: Case syntax now uses brackets [] rather than braces {}. To convert previous PRQL queries to this new syntax simply change case { ... } to case [ ... ]. (@AaronMoat, #3517)

Features:

  • Breaking: The std.sql.read_csv function is now compiled to read_csv by default. Please set the target sql.duckdb to use the DuckDB's read_csv_auto function as previously. (@eitsupi, #3599)
  • The std.sql.read_csv function and the std.sql.read_parquet function supports the sql.clickhouse target. (@eitsupi, #1533)
  • Add std.prql_version function to return PRQL version (@hulxv, #3533)
  • Add support for hex escape sequences in strings. Example "Hello \x51". (@vanillajonathan, #3568)
  • Add support for long Unicode escape sequences. Example "Hello \u{01F422}". (@vanillajonathan, #3569)
  • Add support for binary numerical notation. Example filter status == 0b1111000011110000. (@vanillajonathan, #3661)
  • Add support for hexadecimal numerical notation. Example filter status == 0xff. (@vanillajonathan, #3654)
  • Add support for octal numerical notation. Example filter status == 0o777. (@vanillajonathan, #3672)
  • New compile target sql.glaredb for GlareDB and integration tests for it (However, there is a bug in the test and it is currently not running). (@universalmind303, @scsmithr, @eitsupi, #3669)

Web:

  • Allow cmd-/ (Mac) or ctrl-/ (Windows) to toggle comments in the playground editor (@AaronMoat, #3522)

  • Limit maximum height of the playground editor's error panel to avoid taking over whole screen (@AaronMoat, #3524)

  • The playground now uses Vite (@vanillajonathan).

Integrations:

New Contributors:

0.9.5

17 Sep 03:05
7fca2a8
Compare
Choose a tag to compare

0.9.5 adds a line-wrapping character, fixes a few bugs, and improves our CI. The release has 77 commits from 8 contributors. Selected changes are below.

Look out for some conference talks coming up over the next few weeks, including QCon SF on Oct 2 and date2day on Oct 12.

Language:

  • A new line-wrapping character, for lines that are long and we want to break up into multiple physical lines. This is slightly different from from many languages — it's on the subsequent line:

    from artists
    select is_europe =
    \ country == "DE"
    \ || country == "FR"
    \ || country == "ES"
    

    This allows for easily commenting out physical lines while maintaining a correct logical line; for example:

    from artists
    select is_europe =
    \ country == "DE"
    \ || country == "FR"
    \ || country == "FR"
    -\ || country == "ES"
    +#\ || country == "ES"

    (@max-sixty, #3408)

Fixes:

  • Fix stack overflow on very long queries in Windows debug builds (@max-sixty, #2908)

  • Fix panic when unresolved lineage appears in group or window (@davidot, #3266)

  • Fix a corner-case in handling precedence, and remove unneeded parentheses in some outputs (@max-sixty, #3472)

Web:

Integrations:

Internal changes:

New Contributors:

0.9.4

23 Aug 22:51
18b9cba
Compare
Choose a tag to compare

0.9.4 — 2023-08-24

0.9.4 is a small release with some improvements and bug fixes in the compiler and prqlc. And, the documentation and CI are continually being improved.

This release has 110 commits from 9 contributors. Selected changes:

Features:

  • Strings can be delimited with any odd number of quote characters. The logic for lexing quotes is now simpler and slightly faster. Escapes in single-quote-delimited strings escape single-quotes rather than double-quotes. (@max-sixty, #3274)

Fixes:

Documentation:

Web:

Integrations:

Internal changes:

  • Overhaul our CI to run a cohesive set of tests depending on the specific changes in the PR, and elide all others. This cuts CI latency to less than three minutes for most changes, and enables GitHub's auto-merge to wait for all relevant tests. It also reduces the CI time on merging to main, by moving some tests to only run on specific path changes or on our nightly run.
    We now have one label we can add to PRs to run more tests — pr-nightly. (@max-sixty, #3317 & others).
  • Auto-merge PRs for backports or pre-commit updates (@max-sixty, #3246)
  • Add a workflow to create an issue when the scheduled nightly workflow fails (@max-sixty, #3304)

New Contributors:

0.9.3

02 Aug 18:48
aa884f6
Compare
Choose a tag to compare

0.9.3 is a small release, with mostly documentation, internal, and CI changes.

This release has 85 commits from 10 contributors.

We'd like to welcome @not-my-profile as someone who has helped with lots of internal refactoring in the past couple of weeks.

New Contributors:

0.9.2

25 Jul 21:04
c0d769a
Compare
Choose a tag to compare

0.9.2 is a hotfix release to fix an issue in the 0.9.0 & 0.9.1 release pipelines.

Check out the 0.9.0 release notes for a useful changelog.

0.9.1

25 Jul 17:58
617fa99
Compare
Choose a tag to compare

0.9.1 is a hotfix release to fix an issue in the 0.9.0 release pipeline.

Check out the 0.9.0 release notes for a useful changelog.

0.9.0

25 Jul 05:44
af3298f
Compare
Choose a tag to compare

0.9.0 is probably PRQL's biggest ever release. We have dialect-specific standard-libraries, a regex operator, an initial implementation of multiple-file projects & modules, lots of bug fixes, and many many internal changes.

We've made a few backward incompatible syntax changes. Most queries will work with a simple find/replace; see below for details.

The release has 421 commits from 12 contributors.

A small selection of the changes:

Language:

  • The major breaking change is a new syntax for lists, which have been renamed to tuples, and are now represented with braces {} rather than brackets [].

    To convert previous PRQL queries to this new syntax simply change [ ... ] to { ... }.

    We made the syntax change to incorporate arrays. Almost every major language uses [] for arrays. We are adopting that convention — arrays use [], tuples will use {}. (Though we recognize that {} for tuples is also rare (Hi, Erlang!), but didn't want to further load parentheses with meaning.)

    Arrays are conceptually similar to columns — their elements have a single type. Array syntax can't contain assignments.

    As part of this, we've also formalized tuples as containing both individual items (select {foo, baz}), and assignments (select {foo=bar, baz=fuz}).

  • Some significant changes regarding SQL dialects:

    • Operators and functions can be defined on per-dialect basis. (@aljazerzen, #2681)
    • Breaking: The sql.duckdb target supports DuckDB 0.8 (@eitsupi, #2810).
    • Breaking: The sql.hive target is removed (@eitsupi, #2837).
  • New arithmetic operators. These compile to different function or operator depending on the target.

    • Breaking: Operator / now always performs floating division (@aljazerzen, #2684). See the Division docs for details.

    • Truncated integer division operator // (@aljazerzen, #2684). See the Division docs for details.

    • Regex search operator ~= (@max-sixty, #2458). An example:

      from tracks
      filter {name ~= "Love"}
      

      ...compiles to;

      SELECT
        *
      FROM
        tracks
      WHERE
        REGEXP(name, 'Love')

      ...though the exact form differs by dialect; see the Regex docs for more details.

  • New aggregation functions: every, any, average, and concat_array. Breaking: Remove avg in favor of average.

  • Breaking: We've changed our function declaration syntax to match other declarations. Functions were one of the first language constructs in PRQL, and since then we've added normal declarations there's no compelling reason for functions to be different.

    let add = a b -> a + b
    

    Previously, this was:

    func add a b -> a + b
    
  • Experimental modules, which allow importing declarations from other files. Docs are forthcoming.

  • Relation literals create a relation (a "table") as an array of tuples. This example demonstrates the new syntax for arrays [] and tuples {}. (@aljazerzen, #2605)

    from [{a=5, b=false}, {a=6, b=true}]
    filter b == true
    select a
    
  • this can be used to refer to the current pipeline, for situations where plain column name would be ambiguous:

    from x
    derive sum = my_column
    select this.sum   # does not conflict with `std.sum`
    

    Within a join transform, there is also a reference to the right relation: that.

  • Breaking: functions count, rank and row_number now require an argument of the array to operate on. In most cases you can directly replace count with count this. The non_null argument of count has been removed.

Features:

  • We've changed how we handle colors.

    Options::color is deprecated and has no effect. Code which consumes prql_compiler::compile should instead accept the output with colors and use a library such as anstream to handle the presentation of colors. To ensure minimal disruption, prql_compiler will currently strip color codes when a standard environment variable such as CLI_COLOR=0 is set or when it detects stderr is not a TTY.

    We now use the anstream library in prqlc & prql-compiler.

    (@max-sixty, #2773)

  • prqlc can now show backtraces when the standard backtrace env var (RUST_BACKTRACE) is active. (@max-sixty, #2751)

Fixes:

  • Numbers expressed with scientific notation — 1e9 — are now handled correctly by the compiler (@max-sixty, #2865).

Integrations:

Internal changes:

  • Annotations in PRQL. These have limited support but are currently used to specify binding strengths. They're modeled after Rust's annotations, but with @ syntax, more similar to traditional decorators. (#2729)

    @{binding_strength=11}
    let mod = l r -> s"{l} % {r}"
    
  • Remove BigQuery's special handling of quoted identifiers, now that our module system handles its semantics (@max-sixty, #2609).

  • ClickHouse is tested in CI (@eitsupi, #2815).

New Contributors:

0.8.1

30 Apr 02:20
2d09a9f
Compare
Choose a tag to compare

0.8.1 is a small release with a new list-targets command in prqlc, some documentation improvements, and some internal improvements.

This release has 41 commits from 8 contributors.

From the broader perspective of the project, we're increasing the relative prioritization of it being easy for folks to actually use PRQL — either with existing tools, or a tool we'd build. We'll be thinking about & discussing the best way to do that over the next few weeks.

0.8.0

14 Apr 22:29
523468a
Compare
Choose a tag to compare

0.8.0 renames the and & or operators to && & || respectively, reorganizes the Syntax section in the book, and introduces read_parquet & read_csv functions for reading files with DuckDB.

This release has 38 commits from 8 contributors. Selected changes:

Features:

  • Rename and to && and or to ||. Operators which are symbols are now consistently infix, while "words" are now consistently functions (@aljazerzen, #2422).

  • New functions read_parquet and read_csv, which mirror the DuckDB functions, instructing the database to read from files (@max-sixty, #2409).

0.7.1

04 Apr 05:53
eccd57d
Compare
Choose a tag to compare

0.7.1 is a hotfix release to fix prql-js's npm install behavior when being installed as a dependency.

This release has 17 commits from 4 contributors.