All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qubole.presto.udfs.window.BigintFirstValueIgnoreNullFunction Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2013-2016 Qubole
 *
 * Licensed 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.qubole.presto.udfs.window;

import com.qubole.presto.udfs.WindowFunctionDefinition;
import com.facebook.presto.spi.type.Type;
import com.google.common.collect.ImmutableList;

import java.util.List;

import static com.facebook.presto.spi.type.BigintType.BIGINT;

/**
 * Created by user on 13-03-2015.
 */
public class BigintFirstValueIgnoreNullFunction
        extends FirstOrLastValueIgnoreNullFunction
        implements WindowFunctionDefinition
{
    public BigintFirstValueIgnoreNullFunction(List argumentChannels)
    {
        super(BIGINT, argumentChannels, Direction.FIRST);
    }

    public BigintFirstValueIgnoreNullFunction()
    {
        // Constructor is used by UdfFactory
        super();
    }

    @Override
    public String getName()
    {
        return "first_non_null_value";
    }

    @Override
    public Type getReturnType()
    {
        return BIGINT;
    }

    @Override
    public List getArgumentTypes()
    {
        return ImmutableList.of(BIGINT);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy