0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-27 16:26:50 +01:00
Commit Graph

15 Commits

Author SHA1 Message Date
Sandy Spicer
447a18930f
feat: add "INTERSECT" and "EXCEPT" to HogQL (#25737)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-29 11:31:56 -07:00
Marius Andra
397919d6d9
feat(hog): parser updates for lambdas (#24575) 2024-08-27 11:21:36 +02:00
Marius Andra
c64d94a26c
feat(hog): try catch (#23858) 2024-07-25 16:57:28 +02:00
Marius Andra
0a2c3dca04
feat(hog): for in loops (#23631) 2024-07-11 18:34:21 +02:00
Marius Andra
5c90d21751
feat(hog): nullish coalescing (#23521)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-07-09 13:02:00 +02:00
Marius Andra
4e0c8f985f
feat(hog): for loops and nicer bytecode on /debug, (#22952) 2024-06-13 16:10:37 +00:00
Marius Andra
779b17f46e
feat(hog): remove semicolons, require "as" for column aliases (#22868) 2024-06-12 11:46:11 +02:00
Marius Andra
e6230b4afc
feat(hog): dicts and arrays (#22618) 2024-06-04 12:11:13 +00:00
Marius Andra
0198ec7e1d
feat(hog): f-strings (#22577) 2024-05-30 20:32:39 +02:00
Marius Andra
45d275c4ee
feat(not-defining): Hog (#22336) 2024-05-28 14:51:45 +02:00
Marius Andra
a661b4bcca
fix(hogql): remove unsupported extract(..from..) (#21157) 2024-03-27 17:05:09 +01:00
Marius Andra
4ea13f1c84
feat(hogqlx): nested tags (#18213) 2023-10-27 09:03:54 +02:00
Marius Andra
15e3e851ad
feat(hogql): HogQLX (#18097) 2023-10-26 14:22:22 +02:00
Tom Owers
8577e13599
feat: allow placeholders in place of ratio expressions in hogql (#17973)
* Allow placeholders in place of ratio expressions in hogql

* Added C++ changes for RatioExpr

* Bump `hogql_parser` version

* Upgrade ANTLR version to align with brew latest

* Update query snapshots

* Fix parser change message body

The quotes weren't right, so the step failed instead of posting a comment.

* Revert "Update query snapshots"

This reverts commit 1302d3b24f.

* Update MD5 sum

* Bump version again

* Use new hogql-parser version

---------

Co-authored-by: Michael Matloka <michal@matloka.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Michael Matloka <dev@twixes.com>
2023-10-19 15:37:32 +00:00
Michael Matloka
16a71f60c9
perf: Parse HogQL with C++ for a huge speedup (#17659)
* Add partial C++ parser of HogQL

* Support all the rules and add proper error handling

* Use `AlignAfterOpenBracket: BlockIndent`

* Reuse all the parser tests for the C++ backend

* Fix relationship between headers and implementations

* Add more error handling and fix minor issues

* Build both Python and C++ parsers in the package.json script

* Update ARRAY JOIN error assertion

* Improve timeit

* Move the C extension to the top level

* Refactor `vector_to_list_string`

* Build the parser on Linux

* Build wheels for the parser

* Simplify Linux build and fix macOS

* Fix Homebrew paths on x86 and don't fail fast in CI

* Set MACOSX_DEPLOYMENT_TARGET for C++20

* Set up QEMU for Linux ARM builds

* Publish the wheels on PyPI

* Avoiding Linux ARM emulation in CI for now

* Build sdist too

* Revert Dockerfile changes

* Fix PyPI publish

* Add README and optimize sdist build

* Use setup.py directly instead of build

* Use PyPI hogql-parser instead of local

* Also revert production-unit.Dockerfile

* Fix sdist upload and add Linux ARM back

* No Linux ARM build in the end

* Fix artifact uploading

* Do try building Linux ARM

We need this for prod.

* Use `npm` in `grammar:build`

`pnpm` is not available in that job.

* Fix formatting of hogql_parser

* Build everything on macOS

* Revert "Build everything on macOS"

Not so fast actually.

* Use hogql-parser=0.1.1

* Fix dylib in macOS wheel

* Bump hogql-parser version

* Fix missing module error

* Delete timeit.py

* Make error handling robust

* Format the C++

* Use `hogql-parser==0.1.1`

* Fix reserved keyword error assertions

* Use HEAD hogql_paresr in CI

* Fix `apt` usage

* Add some sudo in CI

* Ensure package will be releasable before build

* Bump version to 0.1.3

* Cover C++ `unquote_string` with tests

* Use BuildJet ARM runners for ARM builds

* Add some instructions

* Add HogQL version check to backend CI

* Update requirements.txt

* Use `setuptools` instead of the deprecated `distutils`

* Fix working dir in backend CI

* Align ANTLR versions

* Add test for "mismatched input"

This is thrown differently than other HogQLSyntaxExceptions in C++, so might help reveal what's going on with tests failing only on Linux CI and not macOS dev

* Add types and bump version

* Comment instead of failing version check

* Automate hogql-release version bump

* Fix checkout token

* Don't build hogql-parser if there were no changes

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Update query snapshots

* Improve documentation

* Use new hogql-parser version

* Fix error start and end initialization

* Note `antlr4-cpp-runtime`

Co-authored-by: Marius Andra <marius.andra@gmail.com>

* Also remove NUL chars in C++

* Check ANTLR4 runtime archive checksum for security

* Note more decrefs to add

* Add vector size checks

* Use new hogql-parser version

* Don't support the `start` arg in C++ `parse_expr`

* Use new hogql-parser version

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marius Andra <marius.andra@gmail.com>
2023-10-13 13:58:08 +00:00