Yingyi Bu | 391f09e | 2015-10-29 13:49:39 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | * or more contributor license agreements. See the NOTICE file |
| 4 | * distributed with this work for additional information |
| 5 | * regarding copyright ownership. The ASF licenses this file |
| 6 | * to you under the Apache License, Version 2.0 (the |
| 7 | * "License"); you may not use this file except in compliance |
| 8 | * with the License. You may obtain a copy of the License at |
| 9 | * |
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | * |
| 12 | * Unless required by applicable law or agreed to in writing, |
| 13 | * software distributed under the License is distributed on an |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | * KIND, either express or implied. See the License for the |
| 16 | * specific language governing permissions and limitations |
| 17 | * under the License. |
| 18 | */ |
| 19 | |
| 20 | drop database tpch if exists; |
| 21 | create database tpch; |
| 22 | |
| 23 | use tpch; |
| 24 | |
| 25 | |
| 26 | create type tpch.LineItemType as |
| 27 | closed { |
| 28 | l_orderkey : int32, |
| 29 | l_partkey : int32, |
| 30 | l_suppkey : int32, |
| 31 | l_linenumber : int32, |
| 32 | l_quantity : double, |
| 33 | l_extendedprice : double, |
| 34 | l_discount : double, |
| 35 | l_tax : double, |
| 36 | l_returnflag : string, |
| 37 | l_linestatus : string, |
| 38 | l_shipdate : string, |
| 39 | l_commitdate : string, |
| 40 | l_receiptdate : string, |
| 41 | l_shipinstruct : string, |
| 42 | l_shipmode : string, |
| 43 | l_comment : string |
| 44 | } |
| 45 | |
| 46 | create type tpch.LineIDType as |
| 47 | closed { |
| 48 | l_orderkey : int32, |
| 49 | l_partkey : int32, |
| 50 | l_suppkey : int32 |
| 51 | } |
| 52 | |
| 53 | create nodegroup group1 if not exists on |
| 54 | nc1, |
| 55 | nc2 |
| 56 | ; |
| 57 | create table LineItems_q1(LineItemType) primary key l_orderkey on group1; |
| 58 | |
| 59 | create table LineID(LineIDType) primary key l_orderkey on group1; |
| 60 | |
| 61 | delete l from LineItems_q1 |
| 62 | ; |