blob: 605768b9c6bdd4ae89216e26edaebb9916acadea [file] [log] [blame]
# Copyright 2011-2015 Quickstep Technologies LLC.
# Copyright 2016 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.
# Name of index is required
CREATE INDEX ON test
--
ERROR: syntax error (1 : 14)
CREATE INDEX ON test
^
==
# Empty-column list is not allowed
CREATE INDEX test ON test ()
--
ERROR: syntax error (1 : 28)
CREATE INDEX test ON test ()
^
==
# Type of index is required
CREATE INDEX test ON test
--
ERROR: syntax error (1 : 26)
CREATE INDEX test ON test
^
==
# Currently supported indices are csbtree, bloomfilter, and sma.
# Unsupported indices should result in syntax error.
CREATE INDEX test ON test USING arbitrary
--
ERROR: syntax error (1 : 33)
CREATE INDEX test ON test USING arbitrary
^
==
CREATE INDEX smaIndex ON test USING SMA
--
CreateIndexStatement[index_name=smaIndex,relation_name=test,index_type=sma]
==
CREATE INDEX bloomIndex ON test USING BLOOMFILTER
--
CreateIndexStatement[index_name=bloomIndex,relation_name=test,
index_type=bloom_filter]
==
CREATE INDEX csbIndex ON test USING CSBTREE
--
CreateIndexStatement[index_name=csbIndex,relation_name=test,index_type=cs_b_tree]
==
# Bitweaving is supported on builds where it was included as a submodule. The
# parser should create code to change the catalog, but on Block creation, no
# index will be created.
CREATE INDEX bwIndex ON test(int_col) USING bitweaving;
--
CreateIndexStatement[index_name=bwIndex,relation_name=test,index_type=bitweaving]
+-attribute_list=
+-AttributeReference[attribute_name=int_col]