Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * 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
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.apache.pig.newplan.logical.rules;
public class LoadTypeCastInserter extends TypeCastInserter {
    public LoadTypeCastInserter(String n) {
    protected OperatorPlan buildPattern() {
        LogicalPlan plan = new LogicalPlan();
        plan.add(new LOLoad(nullplan));
        return plan;

if we are inserting casts in a load and if the loader implements determineSchema(), insert casts only where necessary Note that in this case, the data coming out of the loader is not a BYTEARRAY but is whatever determineSchema() says it is.
            throws FrontendException {
        return ((LOLoadop).getDeterminedSchema();
    protected void markCastInserted(LogicalRelationalOperator op) {
    protected void markCastNoNeed(LogicalRelationalOperator op) {
    protected boolean isCastAdjusted(LogicalRelationalOperator op) {
        return ((LOLoad)op).isCastAdjusted();
New to GrepCode? Check out our FAQ X