Support for i8, Time. Documented PIVOT operation.#383
Merged
Merged
Conversation
Contributor
Author
|
I find it a bit ugly that I had to leak Decimal into the dbsp algebra crate, but that's where mul_by_weigh trait is defined... and Rust doesn't let you put it elsewhere. |
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
lalithsuresh
approved these changes
Jul 25, 2023
| } catch (CalciteContextException e) { | ||
| this.messages.reportError(e); | ||
| if (this.options.optimizerOptions.throwOnError) { | ||
| System.err.println(this.messages.toString()); |
Contributor
There was a problem hiding this comment.
Should we be logging these instead of reporting to stderr?
Contributor
Author
There was a problem hiding this comment.
This is actually just for debugging. The 'throwOnError' flag is only designed for development.
The effect of this is to print in the IDE console some much nicer errors in addition to a stack trace:
(no input file): Error parsing SQL
(no input file):23:17: error: Error parsing SQL: Encountered "," at line 23, column 17.
Was expecting:
"IN" ...
23| FOR name, age) IN (('John', 30) AS c1, ('Mike', 40) AS c2)
^^
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Contributor
Author
|
I have no idea why this CI run failed, I will merge my code anyway. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This started as a simple effort to document the PIVOT operation, but snowballed.
The example tests I found required support for Time and I8 (TINYINT).
So I added these too.
In the process I realized that the work done to add new types grows quadratically, since casts need to go from any type to any type, so I used more Rust macros to simplify the process.
We don't yet have time functions, but I didn't claim that we are done with Time yet.