-
Notifications
You must be signed in to change notification settings - Fork 2
#2: Getting just the library generation in place to library-based ser… #22
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
Draft
brynrhodes
wants to merge
2
commits into
main
Choose a base branch
from
feature-2-in-progress
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| library CqlAggregateFunctionsTest | ||
|
|
||
| define "AllTrue.AllTrueAllTrue": AllTrue({true,true}) | ||
|
|
||
| define "AllTrue.AllTrueTrueFirst": AllTrue({true,false}) | ||
|
|
||
| define "AllTrue.AllTrueFalseFirst": AllTrue({false,true}) | ||
|
|
||
| define "AllTrue.AllTrueAllTrueFalseTrue": AllTrue({true,false,true}) | ||
|
|
||
| define "AllTrue.AllTrueAllFalseTrueFalse": AllTrue({false,true,false}) | ||
|
|
||
| define "AllTrue.AllTrueNullFirst": AllTrue({null,true,true}) | ||
|
|
||
| define "AllTrue.AllTrueEmptyList": AllTrue({}) | ||
|
|
||
| define "AnyTrue.AnyTrueAllTrue": AnyTrue({true,true}) | ||
|
|
||
| define "AnyTrue.AnyTrueAllFalse": AnyTrue({false,false}) | ||
|
|
||
| define "AnyTrue.AnyTrueAllTrueFalseTrue": AnyTrue({true,false,true}) | ||
|
|
||
| define "AnyTrue.AnyTrueAllFalseTrueFalse": AnyTrue({false,true,false}) | ||
|
|
||
| define "AnyTrue.AnyTrueTrueFirst": AnyTrue({true,false}) | ||
|
|
||
| define "AnyTrue.AnyTrueFalseFirst": AnyTrue({false,true}) | ||
|
|
||
| define "AnyTrue.AnyTrueNullFirstThenTrue": AnyTrue({null,true}) | ||
|
|
||
| define "AnyTrue.AnyTrueNullFirstThenFalse": AnyTrue({null,false}) | ||
|
|
||
| define "AnyTrue.AnyTrueEmptyList": AnyTrue({}) | ||
|
|
||
| define "Avg.AvgTest1": Avg({ 1.0, 2.0, 3.0, 6.0 }) | ||
|
|
||
| define "Count.CountTest1": Count({ 15, 5, 99, null, 1 }) | ||
|
|
||
| define "Count.CountTestDateTime": Count({ DateTime(2014), DateTime(2001), DateTime(2010) }) | ||
|
|
||
| define "Count.CountTestTime": Count({ @T15:59:59.999, @T05:59:59.999, @T20:59:59.999 }) | ||
|
|
||
| define "Count.CountTestNull": Count({}) | ||
|
|
||
| define "Max.MaxTestInteger": Max({ 5, 12, 1, 15, 0, 4, 90, 44 }) | ||
|
|
||
| define "Max.MaxTestString": Max({ 'hi', 'bye', 'zebra' }) | ||
|
|
||
| define "Max.MaxTestDateTime": Max({ DateTime(2012, 10, 5), DateTime(2012, 9, 5), DateTime(2012, 10, 6) }) | ||
|
|
||
| define "Max.MaxTestTime": Max({ @T15:59:59.999, @T05:59:59.999, @T20:59:59.999 }) | ||
|
|
||
| define "Median.MedianTestDecimal": Median({6.0, 5.0, 4.0, 3.0, 2.0, 1.0}) | ||
|
|
||
| define "Min.MinTestInteger": Min({5, 12, 1, 15, 0, 4, 90, 44}) | ||
|
|
||
| define "Min.MinTestString": Min({'hi', 'bye', 'zebra'}) | ||
|
|
||
| define "Min.MinTestDateTime": Min({ DateTime(2012, 10, 5), DateTime(2012, 9, 5), DateTime(2012, 10, 6) }) | ||
|
|
||
| define "Min.MinTestTime": Min({ @T15:59:59.999, @T05:59:59.999, @T20:59:59.999 }) | ||
|
|
||
| define "Mode.ModeTestInteger": Mode({ 2, 1, 8, 2, 9, 1, 9, 9 }) | ||
|
|
||
| define "Mode.ModeTestDateTime": Mode({ DateTime(2012, 10, 5), DateTime(2012, 9, 5), DateTime(2012, 10, 6), DateTime(2012, 9, 5) }) | ||
|
|
||
| define "Mode.ModeTestTime": Mode({ @T15:59:59.999, @T05:59:59.999, @T20:59:59.999, @T05:59:59.999 }) | ||
|
|
||
| define "PopulationStdDev.PopStdDevTest1": PopulationStdDev({ 1.0, 2.0, 3.0, 4.0, 5.0 }) | ||
|
|
||
| define "PopulationVariance.PopVarianceTest1": PopulationVariance({ 1.0, 2.0, 3.0, 4.0, 5.0 }) | ||
|
|
||
| define "StdDev.StdDevTest1": StdDev({ 1.0, 2.0, 3.0, 4.0, 5.0 }) | ||
|
|
||
| define "Sum.SumTest1": Sum({ 6.0, 2.0, 3.0, 4.0, 5.0 }) | ||
|
|
||
| define "Sum.SumTestNull": Sum({ null, 1, null }) | ||
|
|
||
| define "Variance.VarianceTest1": Variance({ 1.0, 2.0, 3.0, 4.0, 5.0 }) | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Bryn--just a question: Do we need to actually check in these derived artifacts into the cql-tests-runner repo, or can these be generated on the fly by the runner as needed from the "canonical" test definition XML at runtime only?
I'm wondering checking this opens up the potential for accidental skew if one of these files is modified but the canonicial test definition isn't, or confusion for users on what's the canonical definition. That said if we have some kind of presubmit checking that can say if the cql-tests submodule commit is updated, then all of these files must be re-generated (e.g. run the tests to refresh this definition), that would help prevent this skew.
Either way, the real question I have is--what's the main benefit of including these? Perhaps the main benefit is for users to be able to inspect/debug the intermediate artifacts?
(note I don't feel strongly, just curious)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @suyashkumar , 100% agree, these shouldn't be committed, I only committed them because some of the engines wanted the XML/JSON serialization of the libraries, so this was a stopgap to support that