blob: 161cc00ee100af879723f3e3cdf887590586db14 [file] [log] [blame]
# 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.
[default optimized_logical_plan physical_plan]
create table foo (col1 int not null,
col2 long,
col3 double,
col4 float,
col5 char(5),
col6 varchar(5),
col7 int null,
col8 long null,
col9 double null,
col10 float null,
col11 char(5) null,
col12 varchar(5) null)
--
[Optimized Logical Plan]
TopLevelPlan
+-plan=CreateTable[relation=foo]
| +-attributes=
| +-AttributeReference[id=0,name=col1,relation=foo,type=Int]
| +-AttributeReference[id=1,name=col2,relation=foo,type=Long]
| +-AttributeReference[id=2,name=col3,relation=foo,type=Double]
| +-AttributeReference[id=3,name=col4,relation=foo,type=Float]
| +-AttributeReference[id=4,name=col5,relation=foo,type=Char(5)]
| +-AttributeReference[id=5,name=col6,relation=foo,type=VarChar(5)]
| +-AttributeReference[id=6,name=col7,relation=foo,type=Int NULL]
| +-AttributeReference[id=7,name=col8,relation=foo,type=Long NULL]
| +-AttributeReference[id=8,name=col9,relation=foo,type=Double NULL]
| +-AttributeReference[id=9,name=col10,relation=foo,type=Float NULL]
| +-AttributeReference[id=10,name=col11,relation=foo,type=Char(5) NULL]
| +-AttributeReference[id=11,name=col12,relation=foo,type=VarChar(5) NULL]
+-output_attributes=
+-AttributeReference[id=0,name=col1,relation=foo,type=Int]
+-AttributeReference[id=1,name=col2,relation=foo,type=Long]
+-AttributeReference[id=2,name=col3,relation=foo,type=Double]
+-AttributeReference[id=3,name=col4,relation=foo,type=Float]
+-AttributeReference[id=4,name=col5,relation=foo,type=Char(5)]
+-AttributeReference[id=5,name=col6,relation=foo,type=VarChar(5)]
+-AttributeReference[id=6,name=col7,relation=foo,type=Int NULL]
+-AttributeReference[id=7,name=col8,relation=foo,type=Long NULL]
+-AttributeReference[id=8,name=col9,relation=foo,type=Double NULL]
+-AttributeReference[id=9,name=col10,relation=foo,type=Float NULL]
+-AttributeReference[id=10,name=col11,relation=foo,type=Char(5) NULL]
+-AttributeReference[id=11,name=col12,relation=foo,type=VarChar(5) NULL]
[Physical Plan]
TopLevelPlan
+-plan=CreateTable[relation=foo]
| +-attributes=
| +-AttributeReference[id=0,name=col1,relation=foo,type=Int]
| +-AttributeReference[id=1,name=col2,relation=foo,type=Long]
| +-AttributeReference[id=2,name=col3,relation=foo,type=Double]
| +-AttributeReference[id=3,name=col4,relation=foo,type=Float]
| +-AttributeReference[id=4,name=col5,relation=foo,type=Char(5)]
| +-AttributeReference[id=5,name=col6,relation=foo,type=VarChar(5)]
| +-AttributeReference[id=6,name=col7,relation=foo,type=Int NULL]
| +-AttributeReference[id=7,name=col8,relation=foo,type=Long NULL]
| +-AttributeReference[id=8,name=col9,relation=foo,type=Double NULL]
| +-AttributeReference[id=9,name=col10,relation=foo,type=Float NULL]
| +-AttributeReference[id=10,name=col11,relation=foo,type=Char(5) NULL]
| +-AttributeReference[id=11,name=col12,relation=foo,type=VarChar(5) NULL]
+-output_attributes=
+-AttributeReference[id=0,name=col1,relation=foo,type=Int]
+-AttributeReference[id=1,name=col2,relation=foo,type=Long]
+-AttributeReference[id=2,name=col3,relation=foo,type=Double]
+-AttributeReference[id=3,name=col4,relation=foo,type=Float]
+-AttributeReference[id=4,name=col5,relation=foo,type=Char(5)]
+-AttributeReference[id=5,name=col6,relation=foo,type=VarChar(5)]
+-AttributeReference[id=6,name=col7,relation=foo,type=Int NULL]
+-AttributeReference[id=7,name=col8,relation=foo,type=Long NULL]
+-AttributeReference[id=8,name=col9,relation=foo,type=Double NULL]
+-AttributeReference[id=9,name=col10,relation=foo,type=Float NULL]
+-AttributeReference[id=10,name=col11,relation=foo,type=Char(5) NULL]
+-AttributeReference[id=11,name=col12,relation=foo,type=VarChar(5) NULL]
==
CREATE TABLE foo (col1 INT) WITH BLOCKPROPERTIES
(TYPE compressed_columnstore, SORT col1, COMPRESS ALL, BLOCKSIZEMB 4);
--
[Optimized Logical Plan]
TopLevelPlan
+-plan=CreateTable[relation=foo]
| +-block_properties=ProtoDescription
| | +-Property=ProtoProperty[Property=blocktype,Value=compressed_columnstore]
| | +-Property=ProtoProperty[Property=sort,Value=0]
| | +-Property=ProtoProperty[Property=compress,Value=0]
| | +-Property=ProtoProperty[Property=slots,Value=2]
| +-attributes=
| +-AttributeReference[id=0,name=col1,relation=foo,type=Int]
+-output_attributes=
+-AttributeReference[id=0,name=col1,relation=foo,type=Int]
[Physical Plan]
TopLevelPlan
+-plan=CreateTable[relation=foo]
| +-block_properties=ProtoDescription
| | +-Property=ProtoProperty[Property=blocktype,Value=compressed_columnstore]
| | +-Property=ProtoProperty[Property=sort,Value=0]
| | +-Property=ProtoProperty[Property=compress,Value=0]
| | +-Property=ProtoProperty[Property=slots,Value=2]
| +-attributes=
| +-AttributeReference[id=0,name=col1,relation=foo,type=Int]
+-output_attributes=
+-AttributeReference[id=0,name=col1,relation=foo,type=Int]
==
CREATE TABLE foo (attr INT) PARTITION BY HASH(attr) PARTITIONS 4;
--
[Optimized Logical Plan]
TopLevelPlan
+-plan=CreateTable[relation=foo]
| +-attributes=
| +-AttributeReference[id=0,name=attr,relation=foo,type=Int]
+-output_attributes=
+-AttributeReference[id=0,name=attr,relation=foo,type=Int]
[Physical Plan]
TopLevelPlan
+-plan=CreateTable[relation=foo]
| +-attributes=
| +-AttributeReference[id=0,name=attr,relation=foo,type=Int]
+-output_attributes=
+-AttributeReference[id=0,name=attr,relation=foo,type=Int]
==
CREATE TABLE foo (attr1 INT, attr2 LONG, attr3 FLOAT, attr4 DOUBLE, attr5 CHAR(5), attr6 VARCHAR(4))
PARTITION BY HASH(attr1, attr2, attr3, attr4, attr5, attr6) PARTITIONS 4;
--
[Optimized Logical Plan]
TopLevelPlan
+-plan=CreateTable[relation=foo]
| +-attributes=
| +-AttributeReference[id=0,name=attr1,relation=foo,type=Int]
| +-AttributeReference[id=1,name=attr2,relation=foo,type=Long]
| +-AttributeReference[id=2,name=attr3,relation=foo,type=Float]
| +-AttributeReference[id=3,name=attr4,relation=foo,type=Double]
| +-AttributeReference[id=4,name=attr5,relation=foo,type=Char(5)]
| +-AttributeReference[id=5,name=attr6,relation=foo,type=VarChar(4)]
+-output_attributes=
+-AttributeReference[id=0,name=attr1,relation=foo,type=Int]
+-AttributeReference[id=1,name=attr2,relation=foo,type=Long]
+-AttributeReference[id=2,name=attr3,relation=foo,type=Float]
+-AttributeReference[id=3,name=attr4,relation=foo,type=Double]
+-AttributeReference[id=4,name=attr5,relation=foo,type=Char(5)]
+-AttributeReference[id=5,name=attr6,relation=foo,type=VarChar(4)]
[Physical Plan]
TopLevelPlan
+-plan=CreateTable[relation=foo]
| +-attributes=
| +-AttributeReference[id=0,name=attr1,relation=foo,type=Int]
| +-AttributeReference[id=1,name=attr2,relation=foo,type=Long]
| +-AttributeReference[id=2,name=attr3,relation=foo,type=Float]
| +-AttributeReference[id=3,name=attr4,relation=foo,type=Double]
| +-AttributeReference[id=4,name=attr5,relation=foo,type=Char(5)]
| +-AttributeReference[id=5,name=attr6,relation=foo,type=VarChar(4)]
+-output_attributes=
+-AttributeReference[id=0,name=attr1,relation=foo,type=Int]
+-AttributeReference[id=1,name=attr2,relation=foo,type=Long]
+-AttributeReference[id=2,name=attr3,relation=foo,type=Float]
+-AttributeReference[id=3,name=attr4,relation=foo,type=Double]
+-AttributeReference[id=4,name=attr5,relation=foo,type=Char(5)]
+-AttributeReference[id=5,name=attr6,relation=foo,type=VarChar(4)]