[
https://issues.apache.org/jira/browse/CALCITE-2223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16753822#comment-16753822
]
Vladimir Sitnikov commented on CALCITE-2223:
--------------------------------------------
[~vvysotskyi], would you please test a new variation?
Unfortunately, Drill tests are locale-dependent, and {{LANG=en_US.utf-8 mvn
install}} doesn't seem to resolve that.
Here's what I have:
{noformat}
[ERROR] Failures:
[ERROR] TestDurationFormat.testCompactSecMillis:58->validateDurationFormat:43
expected:<4[,]545s> but was:<4[.]545s>
[ERROR]
TestDurationFormat.testCompactTwoDigitMilliSec:48->validateDurationFormat:43
expected:<0[,]045s> but was:<0[.]045s>
[ERROR]
TestValueVectorElementFormatter.testFormatValueVectorElementAllDateTimeFormats:142
expected:<[Mon, Nov] 5, 2012> but was:<[Пн, ноя] 5, 2012>
[ERROR]
TestValueVectorElementFormatter.testFormatValueVectorElementDateValidPattern:83
expected:<[Mon, Nov] 5, 2012> but was:<[Пн, ноя] 5, 2012>
[ERROR] Errors:
[ERROR] TestFunctionsQuery.testToCharFunction:567 » After matching 0
records, did not...
[ERROR] TestSelectivity.testFilterSelectivityOptions » UserRemote PARSE
ERROR: Encount...
[ERROR]
TestVarDecimalFunctions.testCastDecimalDouble:724->BaseTestQuery.testRunAndReturn:341
» Rpc
[ERROR]
TestVarDecimalFunctions.testCastDoubleDecimal:694->BaseTestQuery.testRunAndReturn:341
» Rpc
[ERROR] TestVarDecimalFunctions.testDecimalToChar:775 » at position 0 column
'`s1`' m...
[ERROR] TestTopNSchemaChanges.testMissingColumn:192 »
org.apache.drill.common.excepti...
[ERROR] TestTopNSchemaChanges.testNumericTypes:82 »
org.apache.drill.common.exception...
[ERROR] TestTopNSchemaChanges.testUnionTypes:162 »
org.apache.drill.common.exceptions...
[ERROR]
TestMergeJoinWithSchemaChanges.testNumericStringTypes:192->BaseTestQuery.testRunAndReturn:341
» Rpc
[ERROR]
TestMergeJoinWithSchemaChanges.testNumericTypes:114->BaseTestQuery.testRunAndReturn:341
» Rpc
[ERROR]
TestMergeJoinWithSchemaChanges.testOneSideSchemaChanges:348->BaseTestQuery.testRunAndReturn:341
» Rpc
[ERROR] TestExternalSort.testNumericTypesLegacy:49->testNumericTypes:113 »
org.apache...
[ERROR] TestExternalSort.testNumericTypesManaged:44->testNumericTypes:113 »
org.apach...
[ERROR] TestImageRecordReader.testAviImage:101->createAndQuery:50 » at
position 0 col...
[ERROR] TestImageRecordReader.testBmpImage:56->createAndQuery:50 » at
position 0 colu...
[ERROR] TestImageRecordReader.testEpsImage:121->createAndQuery:50 » at
position 0 col...
[ERROR] TestImageRecordReader.testJpegImage:71->createAndQuery:50 » at
position 0 col...
[ERROR] TestImageRecordReader.testMovImage:111->createAndQuery:50 » at
position 0 col...
[ERROR] TestImageRecordReader.testPngImage:81->createAndQuery:50 » at
position 0 colu...
[ERROR] TestImageRecordReader.testPsdImage:86->createAndQuery:50 » at
position 0 colu...
[INFO]
[ERROR] Tests run: 3723, Failures: 4, Errors: 20, Skipped: 157
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache Drill Root POM 1.16.0-SNAPSHOT .............. SUCCESS [ 6.470 s]
[INFO] tools/Parent Pom ................................... SUCCESS [ 0.928 s]
[INFO] tools/freemarker codegen tooling ................... SUCCESS [ 6.004 s]
[INFO] Drill Protocol ..................................... SUCCESS [ 5.090 s]
[INFO] Common (Logical Plan, Base expressions) ............ SUCCESS [ 5.898 s]
[INFO] Logical Plan, Base expressions ..................... SUCCESS [ 5.662 s]
[INFO] exec/Parent Pom .................................... SUCCESS [ 0.696 s]
[INFO] exec/memory/Parent Pom ............................. SUCCESS [ 0.569 s]
[INFO] exec/memory/base ................................... SUCCESS [ 3.380 s]
[INFO] exec/rpc ........................................... SUCCESS [ 1.782 s]
[INFO] exec/Vectors ....................................... SUCCESS [ 6.364 s]
[INFO] contrib/Parent Pom ................................. SUCCESS [ 0.487 s]
[INFO] contrib/data/Parent Pom ............................ SUCCESS [ 0.604 s]
[INFO] contrib/data/tpch-sample-data ...................... SUCCESS [ 2.891 s]
[INFO] exec/Java Execution Engine ......................... FAILURE [26:24 min]
[INFO] exec/JDBC Driver using dependencies ................ SKIPPED{noformat}
> ProjectMergeRule is infinitely matched when is applied after
> ProjectReduceExpressionsRule
> -----------------------------------------------------------------------------------------
>
> Key: CALCITE-2223
> URL: https://issues.apache.org/jira/browse/CALCITE-2223
> Project: Calcite
> Issue Type: Bug
> Reporter: Volodymyr Vysotskyi
> Assignee: Julian Hyde
> Priority: Critical
> Attachments:
> TestLimitWithExchanges_testPushLimitPastUnionExchange.png, heap_overview.png,
> provenance_contents.png
>
>
> For queries like this:
> {code:sql}
> select t1.f from (select cast(f as int) f, f from (select cast(f as int) f
> from (values('1')) t(f))) as t1
> {code}
> OOM is thrown when {{ProjectMergeRule}} is applied before applying
> {{ProjectReduceExpressionsRule}} in VolcanoPlanner.
> A simple test to reproduce this issue (in {{RelOptRulesTest}}):
> {code:java}
> @Test public void testOomProjectMergeRule() {
> RelBuilder relBuilder =
> RelBuilder.create(RelBuilderTest.config().build());
> RelNode relNode = relBuilder
> .values(new String[]{"f"}, "1")
> .project(
> relBuilder.alias(
> relBuilder.cast(relBuilder.field(0), SqlTypeName.INTEGER),
> "f"))
> .project(
> relBuilder.alias(
> relBuilder.cast(relBuilder.field(0), SqlTypeName.INTEGER),
> "f0"),
> relBuilder.alias(relBuilder.field(0), "f"))
> .project(
> relBuilder.alias(relBuilder.field(0), "f"))
> .build();
> RelOptPlanner planner = relNode.getCluster().getPlanner();
> RuleSet ruleSet =
> RuleSets.ofList(
> ReduceExpressionsRule.PROJECT_INSTANCE,
> new ProjectMergeRuleWithLongerName(),
> EnumerableRules.ENUMERABLE_PROJECT_RULE,
> EnumerableRules.ENUMERABLE_VALUES_RULE);
> Program program = Programs.of(ruleSet);
> RelTraitSet toTraits =
> relNode.getCluster().traitSet()
> .replace(0, EnumerableConvention.INSTANCE);
> RelNode output = program.run(planner, relNode, toTraits,
> ImmutableList.<RelOptMaterialization>of(),
> ImmutableList.<RelOptLattice>of());
> // check for output
> }
> /**
> * ProjectMergeRule inheritor which has
> * class name greater than ProjectReduceExpressionsRule class name
> (String.compareTo()).
> *
> * It is needed for RuleQueue.popMatch() method
> * to apply this rule before ProjectReduceExpressionsRule.
> */
> private static class ProjectMergeRuleWithLongerName extends
> ProjectMergeRule {
> public ProjectMergeRuleWithLongerName() {
> super(true, RelFactories.LOGICAL_BUILDER);
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)