# Copyright 2023 PingCAP, 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.

# Preparation.
=> DBGInvoke __enable_schema_sync_service('true')

=> DBGInvoke __drop_tidb_table(default, test_uint)
=> drop table if exists default.test_uint



# Data.
=> DBGInvoke __mock_tidb_table(default, test_uint, 'col_1 String, col_2 UInt64','col_2')
=> DBGInvoke __refresh_mapped_table_schema(default, test_uint)
=> DBGInvoke __put_region(4, 0, 100, default, test_uint)
=> DBGInvoke __raft_insert_row(default, test_uint, 4, 88, 'test1')
=> DBGInvoke __raft_insert_row(default, test_uint, 4, 99, 'test2')

=> DBGInvoke dag('select * from default.test_uint where col_2 >= 66')
┌─col_1─┬─col_2─┐
│ test1 │    88 │
│ test2 │    99 │
└───────┴───────┘

# Clean up.
=> DBGInvoke __drop_tidb_table(default, test_uint)
=> drop table if exists default.test_uint
