You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Benchao Li (Jira)" <ji...@apache.org> on 2022/10/30 14:11:00 UTC
[jira] [Resolved] (CALCITE-4804) Support Snapshot operator serialization and deserizalization
[ https://issues.apache.org/jira/browse/CALCITE-4804?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benchao Li resolved CALCITE-4804.
---------------------------------
Fix Version/s: 1.33.0
Resolution: Fixed
Fixed via [https://github.com/apache/calcite/commit/bba9176e6334a16cf97f59be789a5e881619a56e]
Thanks [~jiajunbernoulli] for your PR.
> Support Snapshot operator serialization and deserizalization
> -------------------------------------------------------------
>
> Key: CALCITE-4804
> URL: https://issues.apache.org/jira/browse/CALCITE-4804
> Project: Calcite
> Issue Type: Improvement
> Reporter: xzh_dz
> Assignee: Jiajun Xie
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.33.0
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> In my project, the dimension table has versions of the contents of the table. When I serialize the `Snapshot operator`, there are exceptions. Examples of exceptions can be reproduced as follows.
> {code:java}
> // code placeholder
> @Test void testSnapshot() {
> // Equivalent SQL:
> // SELECT *
> // FROM products_temporal FOR SYSTEM_TIME AS OF TIMESTAMP '2011-07-20 12:34:56'
> final RelBuilder builder = RelBuilder.create(config().build());
> RelNode root =
> builder.scan("products_temporal")
> .snapshot(
> builder.getRexBuilder().makeTimestampLiteral(
> new TimestampString("2011-07-20 12:34:56"), 0))
> .build();
> RelJsonWriter jsonWriter = new RelJsonWriter();
> root.explain(jsonWriter);
> String relJson = jsonWriter.asString();
> String s = deserializeAndDumpToTextFormat(getSchema(root), relJson);
> }{code}
> Exception:
> {code:java}
> // code placeholder
> java.lang.RuntimeException: class does not have required constructor, class org.apache.calcite.rel.logical.LogicalSnapshot(RelInput)java.lang.RuntimeException: class does not have required constructor, class org.apache.calcite.rel.logical.LogicalSnapshot(RelInput)java.lang.RuntimeException: java.lang.RuntimeException: class does not have required constructor, class org.apache.calcite.rel.logical.LogicalSnapshot(RelInput) at org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:193) at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:135) at org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:153) at org.apache.calcite.test.RelBuilderTest.deserializeAndDump(RelBuilderTest.java:4005) at org.apache.calcite.test.RelBuilderTest.deserializeAndDumpToTextFormat(RelBuilderTest.java:3981)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)