You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/01/22 01:17:39 UTC
[jira] [Commented] (CALCITE-1065) Schema snapshots
[ https://issues.apache.org/jira/browse/CALCITE-1065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15111666#comment-15111666 ]
Julian Hyde commented on CALCITE-1065:
--------------------------------------
[~jamestaylor], [~maryannxue], This is the issue we discussed.
> Schema snapshots
> ----------------
>
> Key: CALCITE-1065
> URL: https://issues.apache.org/jira/browse/CALCITE-1065
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
>
> Phoenix would like to prepare queries against a read-consistent view of their catalog. The JDBC user prepares a query against the EMP and DEPT tables as of a given timestamp, or as of now. The implementation of Schema reads from Phoenix's metadata cache and always gives the same definition of EMP and DEPT, even if those tables are subsequently modified. Phoenix's metadata cache accepts a timestamp parameter for the "as of" date. We should extend Calcite's API so that we can use a timestamp specified as a JDBC connection variable.
> I think that {{CalciteConnectionImpl.RootSchema}} should have a {{String timestamp}} field. (I'm not sure what API changes we should make to set it; we'd need to write a unit test.) The timestamp is optional, and its interpretation is left to the target system; in this case Phoenix might use a string representation of a 64 bit integer, because that is its internal time format. When we call {{SchemaFactory.create(SchemaPlus parentSchema, String name, Map<String, Object> operand)}}, the timestamp would be among the operands.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)