vvysotskyi commented on code in PR #2652: URL: https://github.com/apache/drill/pull/2652#discussion_r979588979
########## exec/java-exec/src/main/java/org/apache/drill/exec/store/enumerable/DynamicTypeResolverBuilder.java: ########## @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.drill.exec.store.enumerable; + +import com.fasterxml.jackson.databind.DeserializationConfig; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.jsontype.NamedType; +import com.fasterxml.jackson.databind.jsontype.TypeDeserializer; +import com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder; +import org.reflections.Reflections; + +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +public class DynamicTypeResolverBuilder extends StdTypeResolverBuilder { Review Comment: Yes, fixes for Mongo (in the java-exec module) helped to find out that serde for enumerable plugins is broken, so fixed it here. ########## exec/java-exec/src/main/java/org/apache/drill/exec/store/plan/rule/PluginIntermediatePrelConverterRule.java: ########## @@ -53,7 +54,7 @@ public void onMatch(RelOptRuleCall call) { VertexDrel in = call.rel(0); RelNode intermediatePrel = new PluginIntermediatePrel( in.getCluster(), - in.getTraitSet().replace(outTrait), + in.getTraitSet().replace(outTrait).plus(DrillDistributionTrait.SINGLETON), Review Comment: In this case, Drill wouldn't add extra exchange operators, since this part of the plan is executed in a single drillbit. ########## exec/java-exec/src/main/java/org/apache/drill/exec/store/enumerable/plan/VertexDrel.java: ########## @@ -51,4 +58,15 @@ protected Object clone() { public LogicalOperator implement(DrillImplementor implementor) { throw new UnsupportedOperationException(); } + + @Override + public @Nullable RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) { + double rowCount = estimateRowCount(mq); + double columnCount = Utilities.isStarQuery(getRowType()) ? STAR_COLUMN_COST : getRowType().getFieldCount(); + double valueCount = rowCount * columnCount; Review Comment: I think more queries were affected, but probably it was simpler to reproduce it on queries with joins. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org