-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds an experimental model for PartiQL Schema; as part of working on this PR the following spec issues created as pre-requisite for finalizing the SchemaType: - Define PartiQL Type semantics: https://github.com/partiql/partiql-spec/issues/49 - Create PartiQLSchema specification: https://github.com/partiql/partiql-docs/issues/37 With this change we can model the `SQL` and `NoSQL` schemas on collections with collection constraints. In addition, with this model, we're able to represent other schemas like nested, array, scalar, and possibly Graph schemas as collection of Graph types: ``` // Example of nested schema <<{'a': INT, 'b': [{'x': DECIMAL, 'y': DECIMAL}]>> // Example of Scalar schema <<INT>> // Example of Array schema <<[INT, DECIMAL]>> ``` As StaticType currently does not model the Orderedness of Bag and List as constraints, leaving the Orderedness to the BAG and LIST types themselves. Why the experimental model is a collection? We model the Schema (E.g. an SQL Table`) as a collection to solve the orthogonality problem that SQL has with Table (as entities that define the shape of data) which implicitly defines them as a collection.
- Loading branch information
Showing
8 changed files
with
189 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
Oops, something went wrong.
25eace8
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.
JMH Benchmark
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLCompiler15
121.9857448994516
us/op178.78600274931233
us/op0.68
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLCompiler30
268.8112835077664
us/op418.5568370390489
us/op0.64
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLEvaluator15
510537.44827500003
us/op533443.6401750001
us/op0.96
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLEvaluator30
997945.601575
us/op1222446.32815
us/op0.82
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLEvaluator30WithData10
9893814.1132
us/op12231036.8001
us/op0.81
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLParser15
208.89838990314723
us/op301.8507932113369
us/op0.69
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLParser30
404.72119532100913
us/op560.039721438388
us/op0.72
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameCaseWhenThen
45.47328879680108
us/op84.33832038029709
us/op0.54
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameComplexQuery
61.168558412213656
us/op99.5597883617382
us/op0.61
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameComplexQuery01
305.8527849497845
us/op466.8255558568085
us/op0.66
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameComplexQuery02
534.3976369584485
us/op753.0316382423981
us/op0.71
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameExceptUnionIntersectSixty
209.55217088833493
us/op312.54625044359665
us/op0.67
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameExec20Expressions
67.29747017489123
us/op105.64100637704618
us/op0.64
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameFromLet
47.84055283032348
us/op84.01081008347367
us/op0.57
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameGraphPattern
47.20017912276939
us/op78.44738071797772
us/op0.60
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameGraphPreFilters
71.00340453476154
us/op129.3394864915612
us/op0.55
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameGroupLimit
55.40703229837361
us/op102.84805474327695
us/op0.54
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameLongFromSourceOrderBy
74.70593470005869
us/op107.93428790746259
us/op0.69
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameManyJoins
63.2347954582165
us/op116.52321590854274
us/op0.54
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameNestedAggregates
108.20808835111718
us/op174.73509874558727
us/op0.62
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameNestedParen
22.192997513776874
us/op35.60464769671231
us/op0.62
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNamePivot
69.69960752264195
us/op123.90090448348683
us/op0.56
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQuery15OrsAndLikes
215.03152783548154
us/op373.91275691622326
us/op0.58
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQuery30Plus
122.07279766942709
us/op181.02405922892402
us/op0.67
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQueryFunc
51.157524471722425
us/op80.87059795253256
us/op0.63
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQueryFuncInProjection
111.1181592504636
us/op173.59678448428272
us/op0.64
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQueryList
85.46290406546909
us/op135.2061306946728
us/op0.63
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQueryNestedSelect
747.2058433121742
us/op1042.0312109092433
us/op0.72
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQuerySimple
20.573387210510298
us/op33.073410463225734
us/op0.62
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSeveralJoins
27.006305381099516
us/op45.67430546690951
us/op0.59
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSeveralProjections
79.431949872434
us/op125.50488466135411
us/op0.63
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSeveralSelect
207.20278154416943
us/op314.20100319546737
us/op0.66
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSimpleInsert
34.13190802788205
us/op61.06955608547071
us/op0.56
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSomeJoins
26.692432506653102
us/op45.47182811636012
us/op0.59
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSomeProjections
33.847189040871555
us/op58.23543510744506
us/op0.58
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSomeSelect
55.44217127443388
us/op96.97021392408851
us/op0.57
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameTimeZone
29.818293427989524
us/op51.57560265408532
us/op0.58
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameVeryLongQuery
345.66533154087455
us/op514.2790698117554
us/op0.67
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameVeryLongQuery01
1065.8632303988825
us/op1610.2007579330696
us/op0.66
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameCaseWhenThen
30.72269726471648
us/op46.370498613502676
us/op0.66
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameComplexQuery
274.3167914761209
us/op408.6743469838473
us/op0.67
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameComplexQuery01
127.03269052555109
us/op190.8027002142374
us/op0.67
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameExceptUnionIntersectSixty
239.9242773852905
us/op326.8285820342725
us/op0.73
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameExec20Expressions
72.14097486125576
us/op102.41114064236919
us/op0.70
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameFromLet
42.05182326530868
us/op67.92023264750655
us/op0.62
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameGraphPattern
44.03225069366611
us/op77.23922316612486
us/op0.57
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameGraphPreFilters
76.72195295328942
us/op126.10887684370172
us/op0.61
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameGroupLimit
36.97032203068658
us/op64.83529325147185
us/op0.57
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameLongFromSourceOrderBy
140.06743365939238
us/op216.3515257261985
us/op0.65
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameManyJoins
50.17094319795292
us/op77.92382218865421
us/op0.64
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameNestedAggregates
105.24405772387522
us/op161.2090667280399
us/op0.65
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameNestedParen
87.65243428382931
us/op126.85441327804884
us/op0.69
org.partiql.jmh.benchmarks.ParserBenchmark.parseNamePivot
74.23289939366664
us/op109.72751656784507
us/op0.68
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQuery15OrsAndLikes
194.11802949303117
us/op277.2373013924747
us/op0.70
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQuery30Plus
67.94108157528885
us/op94.62623695211519
us/op0.72
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQueryFunc
146.1932361940414
us/op235.8605469504585
us/op0.62
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQueryFuncInProjection
107.3976116110103
us/op144.98950345556264
us/op0.74
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQueryList
90.97521499673954
us/op122.82032053929728
us/op0.74
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQueryNestedSelect
143.60143976427483
us/op238.27476373088575
us/op0.60
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQuerySimple
14.807963925174391
us/op22.810944493060383
us/op0.65
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSeveralJoins
83.8119598056986
us/op121.21837177794266
us/op0.69
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSeveralProjections
61.93828810191299
us/op91.57925726797724
us/op0.68
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSeveralSelect
127.41665012998374
us/op178.03523965376456
us/op0.72
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSimpleInsert
24.080758645591843
us/op38.77254433103054
us/op0.62
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSomeJoins
24.23460592364361
us/op37.90114221890608
us/op0.64
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSomeProjections
22.057052249798524
us/op34.05643531368401
us/op0.65
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSomeSelect
41.2478380132652
us/op61.10559879142452
us/op0.68
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameTimeZone
11.073561874311373
us/op17.61333649453383
us/op0.63
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameVeryLongQuery
478.1194188147093
us/op645.1519419256034
us/op0.74
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameVeryLongQuery01
1312.237803568824
us/op1831.2364575683
us/op0.72
org.partiql.jmh.benchmarks.PartiQLBenchmark.testPartiQLCompiler
9.966887185556171
us/op17.206178074667466
us/op0.58
org.partiql.jmh.benchmarks.PartiQLBenchmark.testPartiQLEvaluator
2.3622059068002756
us/op3.4625804730030305
us/op0.68
org.partiql.jmh.benchmarks.PartiQLBenchmark.testPartiQLParser
13.89784004916705
us/op23.192171970688143
us/op0.60
This comment was automatically generated by workflow using github-action-benchmark.