blob: 2729591ef9cf44b8581e0ae8e826d25261e01778 [file] [log] [blame]
# Copyright 2011-2015 Quickstep Technologies LLC.
# Copyright 2015 Pivotal Software, Inc.
#
# Licensed 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 initial_logical_plan]
delete from test where int_col+long_col>1-float_col and int_col<4
--
TopLevelPlan
+-plan=DeleteTuples
| +-input=TableReference[relation_name=Test,relation_alias=test]
| | +-AttributeReference[id=0,name=int_col,relation=test,type=Int NULL]
| | +-AttributeReference[id=1,name=long_col,relation=test,type=Long]
| | +-AttributeReference[id=2,name=float_col,relation=test,type=Float]
| | +-AttributeReference[id=3,name=double_col,relation=test,type=Double NULL]
| | +-AttributeReference[id=4,name=char_col,relation=test,type=Char(20)]
| | +-AttributeReference[id=5,name=vchar_col,relation=test,type=VarChar(20) NULL]
| +-predicate=And
| +-Greater
| | +-Add
| | | +-AttributeReference[id=0,name=int_col,relation=test,type=Int NULL]
| | | +-AttributeReference[id=1,name=long_col,relation=test,type=Long]
| | +-Subtract
| | +-Literal[value=1,type=Int]
| | +-AttributeReference[id=2,name=float_col,relation=test,type=Float]
| +-Less
| +-AttributeReference[id=0,name=int_col,relation=test,type=Int NULL]
| +-Literal[value=4,type=Int]
+-output_attributes=
+-[]
==
delete from TesT
--
TopLevelPlan
+-plan=DeleteTuples
| +-input=TableReference[relation_name=Test,relation_alias=TesT]
| +-AttributeReference[id=0,name=int_col,relation=TesT,type=Int NULL]
| +-AttributeReference[id=1,name=long_col,relation=TesT,type=Long]
| +-AttributeReference[id=2,name=float_col,relation=TesT,type=Float]
| +-AttributeReference[id=3,name=double_col,relation=TesT,type=Double NULL]
| +-AttributeReference[id=4,name=char_col,relation=TesT,type=Char(20)]
| +-AttributeReference[id=5,name=vchar_col,relation=TesT,type=VarChar(20) NULL]
+-output_attributes=
+-[]
==
delete from undefined_table
--
ERROR: Unrecognized relation undefined_table (1 : 13)
delete from undefined_table
^
==
delete from test where undefined_col<1
--
ERROR: Unrecognized attribute undefined_col (1 : 24)
delete from test where undefined_col<1
^
==
delete from test where int_col>count(*)
--
ERROR: Aggregate function not allowed in WHERE clause (1 : 32)
delete from test where int_col>count(*)
^