-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unpublishes ISL and removes unused schemadiscovery/partiqlisl packages (
#1123) * Unpublishes ISL * Removes unused schemadiscovery package * Removes unused partiqlisl package * Update CHANGELOG.md Co-authored-by: R. C. Howell <RCHowell@users.noreply.github.com>
- Loading branch information
1 parent
a899307
commit d5a4ac4
Showing
23 changed files
with
132 additions
and
49 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
2 changes: 1 addition & 1 deletion
2
...g/schemadiscovery/ConstraintDiscoverer.kt → ...nschema/discovery/ConstraintDiscoverer.kt
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
2 changes: 1 addition & 1 deletion
2
...lang/schemadiscovery/ConstraintInferer.kt → .../ionschema/discovery/ConstraintInferer.kt
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
2 changes: 1 addition & 1 deletion
2
...lang/schemadiscovery/ConstraintUnifier.kt → .../ionschema/discovery/ConstraintUnifier.kt
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
2 changes: 1 addition & 1 deletion
2
...l/lang/schemadiscovery/ConstraintUtils.kt → ...ql/ionschema/discovery/ConstraintUtils.kt
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
2 changes: 1 addition & 1 deletion
2
...adiscovery/DiscoveredConstraintUnifier.kt → .../discovery/DiscoveredConstraintUnifier.kt
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
2 changes: 1 addition & 1 deletion
2
.../lang/schemadiscovery/IonExampleParser.kt → ...l/ionschema/discovery/IonExampleParser.kt
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
2 changes: 1 addition & 1 deletion
2
.../NormalizeDecimalPrecisionsToUpToRange.kt → .../NormalizeDecimalPrecisionsToUpToRange.kt
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
2 changes: 1 addition & 1 deletion
2
...very/NormalizeNullableVisitorTransform.kt → ...very/NormalizeNullableVisitorTransform.kt
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
2 changes: 1 addition & 1 deletion
2
...adiscovery/SchemaInferencerFromExample.kt → .../discovery/SchemaInferencerFromExample.kt
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
2 changes: 1 addition & 1 deletion
2
...ql/lang/schemadiscovery/TypeConstraint.kt → ...iql/ionschema/discovery/TypeConstraint.kt
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
35 changes: 35 additions & 0 deletions
35
lib/isl/src/main/resources/org/partiql/ionschemas/partiql.isl
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
$ion_schema_1_0 | ||
|
||
type::{ | ||
name: missing, | ||
type: $null, | ||
annotations: [required::$missing], | ||
valid_values: [null] | ||
} | ||
|
||
type::{ | ||
name: bag, | ||
type: list, | ||
annotations: [required::$bag] | ||
} | ||
|
||
type::{ | ||
name: date, | ||
type: { | ||
timestamp_precision: day | ||
}, | ||
annotations: [required::$date] | ||
} | ||
|
||
type::{ | ||
name: time, | ||
type: struct, | ||
fields: { | ||
hour: {type: int, occurs: required, valid_values: range::[0,23]}, | ||
min: {type: int, occurs: required, valid_values: range::[0,59]}, | ||
sec: {type: int, occurs: required, valid_values: range::[0,59]}, | ||
sec_fraction: {type: int, occurs: optional, valid_values: range::[0,999999]} | ||
}, | ||
content: closed, | ||
annotations: [required::$time] | ||
} |
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
44 changes: 44 additions & 0 deletions
44
partiql-lang/src/main/kotlin/org/partiql/lang/util/impl/ResourceAuthority.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.partiql.lang.util.impl | ||
|
||
import com.amazon.ion.IonSystem | ||
import com.amazon.ion.IonValue | ||
import com.amazon.ionschema.Authority | ||
import com.amazon.ionschema.IonSchemaSystem | ||
import com.amazon.ionschema.util.CloseableIterator | ||
import java.io.InputStream | ||
|
||
internal class ResourceAuthority( | ||
private val rootPackage: String, | ||
private val classLoader: ClassLoader, | ||
val ion: IonSystem | ||
) : Authority { | ||
|
||
companion object { | ||
internal fun getResourceAuthority(ion: IonSystem) = | ||
ResourceAuthority("org/partiql/schemas", ResourceAuthority::class.java.classLoader, ion) | ||
} | ||
|
||
override fun iteratorFor(iss: IonSchemaSystem, id: String): CloseableIterator<IonValue> { | ||
val resourceName = "$rootPackage/$id" | ||
val str: InputStream = classLoader.getResourceAsStream(resourceName) | ||
?: error("Failed to load schema with resource name '$resourceName'") | ||
|
||
return object : CloseableIterator<IonValue> { | ||
|
||
private var stream = str | ||
private var reader = ion.newReader(stream).also { it.next() } | ||
private var iter = ion.iterate(reader) | ||
|
||
override fun hasNext() = iter.hasNext() | ||
override fun next() = iter.next() | ||
override fun close() { | ||
try { | ||
reader?.close() | ||
stream.close() | ||
} finally { | ||
reader = null | ||
} | ||
} | ||
} | ||
} | ||
} |
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
d5a4ac4
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
135.46219039581342
us/op116.49074075172639
us/op1.16
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLCompiler30
232.1985825497564
us/op228.08055125420498
us/op1.02
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLEvaluator15
433672.981375
us/op508693.42634166655
us/op0.85
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLEvaluator30
1004457.0931499999
us/op1001563.4725749998
us/op1.00
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLEvaluator30WithData10
9748971.61005
us/op9962325.9436
us/op0.98
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLParser15
201.17041650588786
us/op202.0281624768315
us/op1.00
org.partiql.jmh.benchmarks.MultipleLikeBenchmark.testPartiQLParser30
396.32671351577744
us/op408.81183569115433
us/op0.97
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameCaseWhenThen
44.77304044183771
us/op45.10498151979802
us/op0.99
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameComplexQuery
61.252704726777644
us/op60.78821099779301
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameComplexQuery01
331.73949796480645
us/op317.7416617242735
us/op1.04
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameComplexQuery02
537.7390953908617
us/op534.9156706646895
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameExceptUnionIntersectSixty
209.990418739846
us/op214.56453086847984
us/op0.98
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameExec20Expressions
65.83840527218118
us/op71.60715292028173
us/op0.92
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameFromLet
49.04681016911604
us/op46.13848988850916
us/op1.06
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameGraphPattern
47.350073476416945
us/op45.63885780198228
us/op1.04
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameGraphPreFilters
70.63725448426884
us/op70.28051419678467
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameGroupLimit
58.018776549576806
us/op56.98574026546923
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameLongFromSourceOrderBy
71.1096120626473
us/op69.7186583123229
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameManyJoins
66.43895716407154
us/op65.84008520173124
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameNestedAggregates
118.54332228676738
us/op117.11923898710158
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameNestedParen
22.104237094897933
us/op21.376590289734803
us/op1.03
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNamePivot
71.4980344249249
us/op71.9897351886223
us/op0.99
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQuery15OrsAndLikes
230.9577146588597
us/op222.0861078845788
us/op1.04
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQuery30Plus
120.1437934430163
us/op118.40070198887511
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQueryFunc
55.51308224096753
us/op55.95071528114981
us/op0.99
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQueryFuncInProjection
123.09605280117168
us/op121.50956559997584
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQueryList
83.87576492864272
us/op81.90978665098785
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQueryNestedSelect
756.9246387564533
us/op778.0987201507409
us/op0.97
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameQuerySimple
20.099618499572472
us/op19.618838176598253
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSeveralJoins
26.706975331374178
us/op25.757976553094096
us/op1.04
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSeveralProjections
81.49384686074742
us/op80.40229324124581
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSeveralSelect
211.21696414646766
us/op210.09640933581673
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSimpleInsert
34.29356103955029
us/op34.355712727972005
us/op1.00
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSomeJoins
26.840603767247806
us/op26.19061484233604
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSomeProjections
35.07443715717132
us/op34.02589719287315
us/op1.03
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameSomeSelect
57.19185146911228
us/op55.62806234987206
us/op1.03
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameTimeZone
29.940903653318163
us/op29.008179915125446
us/op1.03
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameVeryLongQuery
349.93850121968126
us/op348.45799694529603
us/op1.00
org.partiql.jmh.benchmarks.ParserBenchmark.parseFailNameVeryLongQuery01
1072.6406629283586
us/op1064.076476394566
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameCaseWhenThen
29.962688744458966
us/op29.37777208192218
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameComplexQuery
272.4694727687815
us/op267.44055411799815
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameComplexQuery01
121.25458464257372
us/op122.20411036954788
us/op0.99
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameExceptUnionIntersectSixty
248.25195583479353
us/op235.07745045955463
us/op1.06
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameExec20Expressions
71.9502505809995
us/op75.32837886900066
us/op0.96
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameFromLet
41.48151680546093
us/op40.34772367593363
us/op1.03
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameGraphPattern
43.105017390501516
us/op44.270829484687454
us/op0.97
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameGraphPreFilters
74.67815122057634
us/op76.68065191378003
us/op0.97
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameGroupLimit
37.55647924651584
us/op37.38741731274619
us/op1.00
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameLongFromSourceOrderBy
144.53146304919716
us/op152.78269711840352
us/op0.95
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameManyJoins
49.604288725740936
us/op48.47955618514009
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameNestedAggregates
107.285975475394
us/op102.57682017600314
us/op1.05
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameNestedParen
91.41854146171833
us/op91.41141689200242
us/op1.00
org.partiql.jmh.benchmarks.ParserBenchmark.parseNamePivot
76.97883430137044
us/op72.50498208501463
us/op1.06
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQuery15OrsAndLikes
197.2521527240533
us/op195.23765351576543
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQuery30Plus
66.68405966447823
us/op65.64571219886649
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQueryFunc
144.6358038238968
us/op141.72120913752013
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQueryFuncInProjection
105.85993532402378
us/op103.95158233033855
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQueryList
89.20440134843082
us/op87.19096700832554
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQueryNestedSelect
151.48685480529252
us/op149.9928494310198
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameQuerySimple
15.399567345730045
us/op15.071264618712487
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSeveralJoins
83.71073466434476
us/op83.65357803246178
us/op1.00
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSeveralProjections
62.385795634543356
us/op64.38123491963292
us/op0.97
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSeveralSelect
124.04729414396093
us/op130.027454281237
us/op0.95
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSimpleInsert
25.04941857875947
us/op25.90496066766492
us/op0.97
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSomeJoins
25.332481487087872
us/op25.768088297207377
us/op0.98
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSomeProjections
21.84174214191674
us/op21.479039753503148
us/op1.02
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameSomeSelect
42.8230103013876
us/op42.4139879778898
us/op1.01
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameTimeZone
10.892230501973405
us/op10.524006420190897
us/op1.03
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameVeryLongQuery
470.9505016193073
us/op473.41839397856273
us/op0.99
org.partiql.jmh.benchmarks.ParserBenchmark.parseNameVeryLongQuery01
1391.6988986133722
us/op1324.983061264669
us/op1.05
org.partiql.jmh.benchmarks.PartiQLBenchmark.testPartiQLCompiler
9.418191471045324
us/op9.864231505240728
us/op0.95
org.partiql.jmh.benchmarks.PartiQLBenchmark.testPartiQLEvaluator
2.537204835983177
us/op2.4776408812082047
us/op1.02
org.partiql.jmh.benchmarks.PartiQLBenchmark.testPartiQLParser
13.763786025594632
us/op13.425144622350865
us/op1.03
This comment was automatically generated by workflow using github-action-benchmark.