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

ompute.logical-plan.0.2.1.source-code.Projection.kt Maven / Gradle / Ivy

There is a newer version: 0.2.5
Show newest version
package org.ballistacompute.logical

import org.ballistacompute.datatypes.Schema

/**
 * Logical plan representing a projection (evaluating a list of expressions) against an input
 */
class Projection(val input: LogicalPlan, val expr: List): LogicalPlan {
    override fun schema(): Schema {
        return Schema(expr.map { it.toField(input) })
    }

    override fun children(): List {
        return listOf(input)
    }

    override fun toString(): String {
        return "Projection: ${ expr.map { it.toString() }.joinToString(", ") }"
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy