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 2015/02/06 20:59:40 UTC
[jira] [Updated] (CALCITE-488) Enumerable where Holder is
custom class with a single field does not work
[ https://issues.apache.org/jira/browse/CALCITE-488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated CALCITE-488:
--------------------------------
Fix Version/s: 1.0.0-incubating
> Enumerable<Holder> where Holder is custom class with a single field does not work
> ---------------------------------------------------------------------------------
>
> Key: CALCITE-488
> URL: https://issues.apache.org/jira/browse/CALCITE-488
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.0.0-incubating
> Reporter: Vladimir Sitnikov
> Assignee: Vladimir Sitnikov
> Fix For: 1.0.0-incubating
>
>
> Calcite treats it as SCALAR (due to JavaRowFormat.optimize), thus field access does not work.
> {code:java}
> public final IntHolder[] primesCustomBoxed =
> new IntHolder[]{new IntHolder(1), new IntHolder(3), new IntHolder(5)};
> {code}
> {code:java}
> @Test public void testCustomBoxedScalar() {
> CalciteAssert.that()
> .with("s", new ReflectiveSchemaTest.CatchallSchema())
> .query("select \"value\" from \"s\".\"primesCustomBoxed\"")
> .returnsUnordered("1", "3", "5");
> }{code}
> {noformat}
> Caused by: arrays first differed at element [0]; expected:<[1]> but was:<[value=org.apache.calcite.test.ReflectiveSchemaTest$IntHolder@2aa3cd93]>{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)