[ https://issues.apache.org/jira/browse/CALCITE-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maryann Xue updated CALCITE-1941: --------------------------------- Description: The current Schema#snapshot(long timestamp) interface is limited, for it assumes that users only use timestamp for schema version control, thus we need something new to replace the "timestamp" parameter. So we'll introduce a SchemaVersion interface with a partial ordering contract that is: 1) Reflexive: if a.equals(b) then a.lessThanOrEqualTo(b); 2) Transitive: if a. lessThanOrEqualTo(b) and b. lessThanOrEqualTo(c) then a.lessThanOrEqualTo(c); and 3) anti-symmetric: if a.lessThanOrEqualTo(b) and !a.equals(b) then !b.lessThanOrEqualTo(a); User can implement their own SchemaVersion, which, aside from following the partial ordering contract, must also override {{equals()}}, {{hashCode()}} and {{toString()}}, so that user can, through overriding {{CalciteConnection#createPrepareContext()}}, create a Schema snapshot of a specific SchemaVersion used by the prepare context. was: The current Schema#snapshot(long timestamp) interface is limited, for it assumes that users only use timestamp for schema version control, thus we need something new to replace the "timestamp" parameter. So we'll introduce a SchemaVersion interface with a partial ordering contract described below: > Refine interface Schema#snapshot() > ---------------------------------- > > Key: CALCITE-1941 > URL: https://issues.apache.org/jira/browse/CALCITE-1941 > Project: Calcite > Issue Type: Improvement > Components: core > Affects Versions: 1.13.0 > Reporter: Maryann Xue > Assignee: Maryann Xue > Priority: Minor > Fix For: 1.14.0 > > > The current Schema#snapshot(long timestamp) interface is limited, for it > assumes that users only use timestamp for schema version control, thus we > need something new to replace the "timestamp" parameter. > So we'll introduce a SchemaVersion interface with a partial ordering contract > that is: > 1) Reflexive: if a.equals(b) then a.lessThanOrEqualTo(b); > 2) Transitive: if a. lessThanOrEqualTo(b) and b. lessThanOrEqualTo(c) then > a.lessThanOrEqualTo(c); > and 3) anti-symmetric: if a.lessThanOrEqualTo(b) and !a.equals(b) then > !b.lessThanOrEqualTo(a); > User can implement their own SchemaVersion, which, aside from following the > partial ordering contract, must also override {{equals()}}, {{hashCode()}} > and {{toString()}}, so that user can, through overriding > {{CalciteConnection#createPrepareContext()}}, create a Schema snapshot of a > specific SchemaVersion used by the prepare context. -- This message was sent by Atlassian JIRA (v6.4.14#64029)