Skip to content

Commit

Permalink
Add more test case comment (#494)
Browse files Browse the repository at this point in the history
Signed-off-by: jinhai <haijin.chn@gmail.com>
  • Loading branch information
JinHai-CN authored Jan 30, 2024
1 parent 062f67d commit a1ffab6
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 0 deletions.
27 changes: 27 additions & 0 deletions python/test/data_type/test_embedding.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright(C) 2023 InfiniFlow, Inc. All rights reserved.
#
# 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
#
# https://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.

import pandas as pd
from numpy import dtype

import infinity
from infinity.common import NetworkAddress, REMOTE_HOST

# test insert and output float with upper bound dimension and lower bound dimension and empty dimension

# test filter/groupby/sort/limit embedding column failed.

# test count(embedding_column) correctly and other aggregate function on embedding columns are failed.

# test multiple embedding column insert/delete/update more the one data block which row count is more than 8192.
35 changes: 35 additions & 0 deletions python/test/data_type/test_float.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright(C) 2023 InfiniFlow, Inc. All rights reserved.
#
# 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
#
# https://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.

import pandas as pd
from numpy import dtype

import infinity
from infinity.common import NetworkAddress, REMOTE_HOST

# test insert and output float with upper bound and lower bound and zero value

# test select where various float expression/function filter, including upper bound and lower bound and zero value

# test output with various float expression/function, including upper bound and lower bound and zero value

# test aggregate with various float expression/function, including upper bound and lower bound and zero value

# test group by various float expression/function, including upper bound and lower bound and zero value

# test sort by various float expression/function, including upper bound and lower bound and zero value

# test limit by various float expression/function, including upper bound and lower bound and zero value

# test sort and limit by various float expression/function, including upper bound and lower bound and zero value
35 changes: 35 additions & 0 deletions python/test/data_type/test_integer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright(C) 2023 InfiniFlow, Inc. All rights reserved.
#
# 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
#
# https://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.

import pandas as pd
from numpy import dtype

import infinity
from infinity.common import NetworkAddress, REMOTE_HOST

# test insert and output integer with upper bound and lower bound and zero value

# test select where various integer expression/function filter, including upper bound and lower bound and zero value

# test output with various integer expression/function, including upper bound and lower bound and zero value

# test aggregate with various integer expression/function, including upper bound and lower bound and zero value

# test group by various integer expression/function, including upper bound and lower bound and zero value

# test sort by various integer expression/function, including upper bound and lower bound and zero value

# test limit by various integer expression/function, including upper bound and lower bound and zero value

# test sort and limit by various integer expression/function, including upper bound and lower bound and zero value
32 changes: 32 additions & 0 deletions python/test/data_type/test_varchar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright(C) 2023 InfiniFlow, Inc. All rights reserved.
#
# 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
#
# https://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.

import pandas as pd
from numpy import dtype

import infinity
from infinity.common import NetworkAddress, REMOTE_HOST

# create a table, one column data are all inline varchar, output correctly.
# create a table, one column data are all inline varchar, and more than one block, output correctly.
# create a table, one column data are all outline varchar, output correctly.
# create a table, one column data are all outline varchar, and more than one block, output correctly.
# where clause with varchar column ==, <>, >, >=, <, <= operator.
# where clause with varchar column AND OR NOT, not supported.
# where clause with varchar column IS NULL, IS NOT NULL expression. supported?
# aggregate with varchar column
# group by on varchar column
# sort by on varchar column


27 changes: 27 additions & 0 deletions python/test/test_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,3 +408,30 @@ def test_empty_table(self):
res = table_obj.output(["c1", "c2", "c1"]).to_df()
pd.testing.assert_frame_equal(res, pd.DataFrame({'c1': (), 'c2': (), 'c1_2': ()}).astype(
{'c1': dtype('int32'), 'c2': dtype('int32'), 'c1_2': dtype('int32')}))


# insert primitive data type not aligned with table definition
# insert large varchar which exceeds the limit to table
# insert embedding data which type info isn't match with table definition
# insert data into non-existent table, dropped table
# insert empty into table
# insert data into index created table

# insert table with 10000 columns.
# insert table with columns isn't matched (more and less)
# insert table with column value exceeding invalid value range

# batch insert, within limit
# batch insert with 10000 columns
# batch insert, batch size limit? 8192?
# batch insert, with invalid data type inside.
# batch insert, with invalid column count
# create/drop/describe/get valid table name with different column types


# create a table with all types supported, each column can be output correctly.
# create a table, insert more than one data block, each column data is output correctly.
# create a table, one column data are all inline varchar, output correctly.
# create a table, one column data are all inline varchar, and more than one block, output correctly.
# create a table, one column data are all outline varchar, output correctly.
# create a table, one column data are all outline varchar, and more than one block, output correctly.

0 comments on commit a1ffab6

Please sign in to comment.