Skip to content

[SIG-11508]: pivot and unpivot #1

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

Closed
wants to merge 24 commits into from

Conversation

markwongsk
Copy link

No description provided.

ovr and others added 24 commits December 28, 2020 12:22
Introduce support for EXPLAIN [ANALYZE] [VERBOSE] <STATEMENT> syntax
* Support analyze table

* Cleanup
* Parse floats without leading number

* Move period token test

* Comments

* Enable test
* feat: support parsing multiple show variables.

* fix: fix fmt error
Adds support for `TRY_CAST` and fixes a clippy error
This introduces support for ILIKE and NOT ILIKE. ILIKE is the
case-insensitive variant of LIKE. Systems such as Postgres, Redshift,
and Snowflake provide this variant.[1][2][3]

[1] https://www.postgresql.org/docs/7.3/functions-matching.html
[2] https://docs.aws.amazon.com/redshift/latest/dg/r_patternmatching_condition_like.html
[3] https://docs.snowflake.com/en/sql-reference/functions/ilike.html
@markwongsk markwongsk force-pushed the mark/SIG-11508-pivot-and-unpivot branch from 238653e to 35ef0ee Compare May 7, 2021 23:59
@markwongsk markwongsk closed this May 8, 2021
@markwongsk markwongsk deleted the mark/SIG-11508-pivot-and-unpivot branch May 8, 2021 00:01
markwongsk pushed a commit that referenced this pull request Aug 24, 2021
markwongsk added a commit that referenced this pull request Aug 25, 2021
* Fixed trivial tests failures

* Fixed more tests

* Ignored backcompat breaks... for now

* More simple tests fixes

* Fixed tests... but not sure whether this is right

* Clippy

* cargo fmt

* Fixed regression #1

* Fixed second regression

* Ignore snowflake numeric failing test
donhcd added a commit that referenced this pull request Jan 13, 2023
* cargo fmt

* add json index for snowflake, bq

* add flatten

* add snowflake dateparts

* useful parsing errors

* parse decimals without 0 prefix

* snowflake: within group

* snowflake: json bracket syntax

* snowflake: join where

* snowflake: ilike

* snowflake: handle like ... escape ...

* snowflake: try_cast

* snowflake: qualify

* snowflake: handle pivot

* snowflake: allow idents to start with $

* snowflake: fix parsing for position

* snowflake: minus set operator

* snowflake json: cleanup/fix bracket and dot notation

* snowflake: number

* snowflake: string literal parse esc quotes

* snowflake: nested exprs can be lists

* join constraints are not required

* smarter number literal parsing with state machine for scientific notation

* snowflake: date/time field variants

* rs/pg: AT TIME ZONE

* rs: ignore/respect nulls

* tokenizer: treat zwsp as whitespace

* pg/rs: SIMILAR TO

* rs: allow brackets around idents

* rs: allow str literal date/time parts

* rs: more IS [NOT] *

* pg: add json ops

* add BigQueryDialect

* bq: backtick quoted idents

* bq: be resilient to trailing commas

* bq: be much more flexible with parsing function args

* bq: handle idents using backticks

* bq: handle interval parsing

* bq: parse regex literals (consider merging with snowflake str parsing)

* bq: add in more date/time parts

* bq: allow aliases with backtick quoting

* bq: parse wildcard modifiers except/replace

* bq: named window specs

* bq: IN <expr>

* snowflake: remove special position handling? maybe should remove more

* bq: double quoted string

* bq: typeless structs

* bq: add secret datetime fields

* fixup bq args bs

* snowflake: ignore/respect nulls for window funcs

* Added Unpivot. Fixed some Pivot (#2)

-- Technically, unpivot has some stricter
   expr requirements (eg instead of expr for ident in col_list
   it should be <column> for ident in col_list). I haven't been
   able to navigate to find this stricter definition yet, but
   maybe we want this fix ASAP.

* [SIG-13647] allow idents for limits and offsets (#3)

* Fix compilation issues (#5)

* Use enum to prevent &'static str lifetime issues

-- Could also use `serde(bound(deserialize = "'de: 'static"))`
-- But I think that will need to be applied on all structs
-- that depend on Expr... which I assume will be ubiquitous

* Make WindowSpec serializable

* Fix more static str stuff

* Fixed tests

* Fixed all compilation errors

* Run clippy --fix

* Fixd lint errors

* Fix more lint errors

* Fix remaining lint issues

* Fix tests pass (#7)

* Fixed trivial tests failures

* Fixed more tests

* Ignored backcompat breaks... for now

* More simple tests fixes

* Fixed tests... but not sure whether this is right

* Clippy

* cargo fmt

* Fixed regression #1

* Fixed second regression

* Ignore snowflake numeric failing test

* Added tests for sigma-related parser changes (#8)

* Added regression tests

* Added test for sigma-related parser changes

* Amended comments

* Removed extraneous println

* Fixed build errors part 1

* Manual cargo fmt because it's hanging on my machine

* When you fail at %s

Co-authored-by: Mark Wong Siang Kai <markwongsk@gmail.com>
jmhain pushed a commit that referenced this pull request Dec 21, 2023
Fix clippy in regexp_match branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants