Skip to content
Snippets Groups Projects
Select Git revision
  • develop default protected
  • simmc-based
  • drill-experiment
  • tg-felipe
  • issue/97
  • issue/63
  • icde-2019-experiments
  • issue/85
  • master protected
  • issue/20
  • refactor/engine
  • issue/6
  • feature/diagrams
  • wip-transformers
14 results

expression.ts

Blame
  • expression.ts 1.83 KiB
    /*
     * Copyright (C) 2018 Centro de Computacao Cientifica e Software Livre
     * Departamento de Informatica - Universidade Federal do Parana
     *
     * This file is part of blend.
     *
     * blend is free software: you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation, either version 3 of the License, or
     * (at your option) any later version.
     *
     * blend is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with blend.  If not, see <http://www.gnu.org/licenses/>.
     */
    
    import { View } from "../core/view";
    
    /**
     * Operation codes to each allowed operation over a view.
     */
    export enum Opcode {
        /**
         * Push operation.
         * This operation means that the view is materialized.
         * This also means that there are no need to create it
         * using other views.
         * And also means that this view is a valid data location.
         */
        PUSH,
        /**
         * Join operation.
         * The view will be created using a set of others view.
         * This operation is equivalent a INNER JOIN of SQL
         * or as close as possible of JOIN.
         */
        JOIN,
        /**
         * Reduce operation.
         * The reduce operation removes irrelevant metrics and
         * dimensions and apply clauses. Represents the Projection
         * and Selecion operations of Relational Algebra.
         */
        REDUCE
    }
    
    /**
     * Defines how to construct a View with a operation
     * and a set of chidren Views.
     */
    export interface Operation {
        /** Operation code used. */
        opcode: Opcode;
        /** Set of views required to perform the operation. */
        values: View[];
    }