Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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 com.hazelcast.org.apache.calcite.adapter.enumerable;
import com.hazelcast.org.apache.calcite.DataContext;
import com.hazelcast.org.apache.calcite.avatica.Helper;
import com.hazelcast.org.apache.calcite.config.CalciteSystemProperty;
import com.hazelcast.org.apache.calcite.interpreter.Compiler;
import com.hazelcast.org.apache.calcite.interpreter.InterpretableConvention;
import com.hazelcast.org.apache.calcite.interpreter.InterpretableRel;
import com.hazelcast.org.apache.calcite.interpreter.Node;
import com.hazelcast.org.apache.calcite.interpreter.Row;
import com.hazelcast.org.apache.calcite.interpreter.Sink;
import com.hazelcast.org.apache.calcite.jdbc.CalcitePrepare;
import com.hazelcast.org.apache.calcite.linq4j.AbstractEnumerable;
import com.hazelcast.org.apache.calcite.linq4j.Enumerable;
import com.hazelcast.org.apache.calcite.linq4j.Enumerator;
import com.hazelcast.org.apache.calcite.linq4j.tree.ClassDeclaration;
import com.hazelcast.org.apache.calcite.linq4j.tree.Expressions;
import com.hazelcast.org.apache.calcite.linq4j.tree.FieldDeclaration;
import com.hazelcast.org.apache.calcite.linq4j.tree.VisitorImpl;
import com.hazelcast.org.apache.calcite.plan.ConventionTraitDef;
import com.hazelcast.org.apache.calcite.plan.RelOptCluster;
import com.hazelcast.org.apache.calcite.plan.RelTraitSet;
import com.hazelcast.org.apache.calcite.rel.RelNode;
import com.hazelcast.org.apache.calcite.rel.convert.ConverterImpl;
import com.hazelcast.org.apache.calcite.runtime.ArrayBindable;
import com.hazelcast.org.apache.calcite.runtime.Bindable;
import com.hazelcast.org.apache.calcite.runtime.Hook;
import com.hazelcast.org.apache.calcite.runtime.Typed;
import com.hazelcast.org.apache.calcite.runtime.Utilities;
import com.hazelcast.org.apache.calcite.util.Util;
import com.hazelcast.com.google.common.cache.Cache;
import com.hazelcast.com.google.common.cache.CacheBuilder;
import com.hazelcast.org.codehaus.commons.compiler.CompileException;
import com.hazelcast.org.codehaus.commons.compiler.CompilerFactoryFactory;
import com.hazelcast.org.codehaus.commons.compiler.IClassBodyEvaluator;
import com.hazelcast.org.codehaus.commons.compiler.ICompilerFactory;
import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.Modifier;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
/**
* Relational expression that converts an enumerable input to interpretable
* calling convention.
*
* @see EnumerableConvention
* @see com.hazelcast.org.apache.calcite.interpreter.BindableConvention
*/
public class EnumerableInterpretable extends ConverterImpl
implements InterpretableRel {
protected EnumerableInterpretable(RelOptCluster cluster, RelNode input) {
super(cluster, ConventionTraitDef.INSTANCE,
cluster.traitSetOf(InterpretableConvention.INSTANCE), input);
}
@Override public EnumerableInterpretable copy(RelTraitSet traitSet,
List inputs) {
return new EnumerableInterpretable(getCluster(), sole(inputs));
}
public Node implement(final InterpreterImplementor implementor) {
final Bindable bindable = toBindable(implementor.internalParameters,
implementor.spark, (EnumerableRel) getInput(),
EnumerableRel.Prefer.ARRAY);
final ArrayBindable arrayBindable = box(bindable);
final Enumerable