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 org.apache.hive.hplsql.objects;
import java.util.HashMap;
import java.util.Map;
import org.apache.hive.hplsql.ColumnDefinition;
import org.apache.hive.hplsql.Row;
import org.apache.hive.hplsql.Var;
import org.apache.hive.hplsql.executor.QueryResult;
/**
* Oracle's PL/SQL Table/associative array.
*
* Tables can be modelled after a corresponding Hive table or they can be created manually.
*
* 1. Model the table after the emp Hive table
* TYPE t_tab IS TABLE OF emp%ROWTYPE INDEX BY BINARY_INTEGER;
*
* 2. Model the table after a column of a Hive table (emp.name). This table will hold a single column only.
* TYPE t_tab IS TABLE OF emp.name%TYPE INDEX BY BINARY_INTEGER;
*
* 3. Or you can specify the column manually. This table will hold one column only.
* TYPE t_tab IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
*
* In the first case the values will be records where each key in the record matches the columns to the corresponding table.
* tab(key).col_name;
*
* In the last two cases the values will represent scalars but they stored in a record with a single key.
* tab(key)
*
* Iteration logic uses the first/last next and prior methods.
* First/last returns a key, next/prior gives back the next or previous key based on the key passed in.
*/
public class Table implements HplObject {
private final TableClass hplClass;
private final Map