blob: e0b1b8908aa4de21b991b2c75d89dbf9bd1b42c9 [file] [log] [blame]
Yingyi Bu391f09e2015-10-29 13:49:39 -07001/*
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 * Description : This test case is to verify the fix for issue353
21
22drop database tpch if exists;
23create database tpch;
24
25use tpch;
26
27
28create type tpch.LineItemType as
29 closed {
30 l_orderkey : int32,
31 l_partkey : int32,
32 l_suppkey : int32,
33 l_linenumber : int32,
34 l_quantity : double,
35 l_extendedprice : double,
36 l_discount : double,
37 l_tax : double,
38 l_returnflag : string,
39 l_linestatus : string,
40 l_shipdate : string,
41 l_commitdate : string,
42 l_receiptdate : string,
43 l_shipinstruct : string,
44 l_shipmode : string,
45 l_comment : string
46}
47
48create table LineItem(LineItemType) primary key l_orderkey,l_linenumber;
49
50write output to nc1:"/tmp/push_limit.adm"
51select element {'l_returnflag':l.l_returnflag,'l_linestatus':l.l_linestatus,'l_shipmode':l.l_shipmode}
52from LineItem as l
53limit 2
54;