blob: d97701b8989daf3ceabefc03ef3c16fc0734ef98 [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.
# 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]
==
CREATE INDEX bwhIndex ON test(int_col) USING bitweaving (TYPE H);
--
CreateIndexStatement[index_name=bwhIndex,relation_name=test,
index_type=bitweaving]
+-attribute_list=
| +-AttributeReference[attribute_name=int_col]
+-index_property_list=
+-IndexProperties
+-index_property=KeyStringValue[key=TYPE]
+-value=String[value=H]