Skip to content

Commit

Permalink
Remove order by array test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
RinChanNOWWW committed Nov 3, 2022
1 parent 36856a6 commit 2951f01
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 39 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/common/arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ simd = ["arrow/simd"]
# Workspace dependencies

# Crates.io dependencies
arrow = { package = "arrow2", git = "https://github.com/RinChanNOWWW/arrow2", rev = "78c61d5", default-features = false, features = [
arrow = { package = "arrow2", git = "https://github.com/RinChanNOWWW/arrow2", rev = "8bd6417", default-features = false, features = [
"io_parquet",
"io_parquet_compression",
] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ pub fn try_add_multi_sort_merge(
sort_columns_descriptions: Vec<SortColumnDescription>,
) -> Result<()> {
match pipeline.pipes.last() {
None => Err(ErrorCode::LogicalError("Cannot resize empty pipe.")),
None => Err(ErrorCode::Internal("Cannot resize empty pipe.")),
Some(pipe) if pipe.output_size() == 0 => {
Err(ErrorCode::LogicalError("Cannot resize empty pipe."))
Err(ErrorCode::Internal("Cannot resize empty pipe."))
}
Some(pipe) if pipe.output_size() == 1 => Ok(()),
Some(pipe) => {
Expand Down Expand Up @@ -93,7 +93,7 @@ impl Cursor {
Cursor {
input_index,
row_index: 0,
num_rows: rows.num_rows(),
num_rows: rows.len(),
rows,
}
}
Expand Down Expand Up @@ -456,7 +456,7 @@ impl Processor for MultiSortMergeProcessor {
}
}
ProcessorState::Output => Ok(Event::Sync),
_ => Err(ErrorCode::LogicalError("It's a bug.")),
_ => Err(ErrorCode::Internal("It's a bug.")),
}
}

Expand Down Expand Up @@ -488,7 +488,7 @@ impl Processor for MultiSortMergeProcessor {
self.state = ProcessorState::Generated(block);
Ok(())
}
_ => Err(ErrorCode::LogicalError("It's a bug.")),
_ => Err(ErrorCode::Internal("It's a bug.")),
}
}
}
Expand Down
8 changes: 0 additions & 8 deletions tests/logictest/suites/base/03_dml/03_0003_select_group_by
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,6 @@ CREATE TABLE IF NOT EXISTS t_array(id Int null, arr Array(Int32) null) Engine =
statement ok
INSERT INTO t_array VALUES(1, []), (2, []), (3, [1,2,3]), (4, [1,2,3]), (5, [4,5,6]), (6, [4,5,6]);

statement query IIT
SELECT max(id), min(id), arr FROM t_array GROUP BY arr ORDER BY arr ASC;

----
2 1 []
4 3 [1, 2, 3]
6 5 [4, 5, 6]

statement query I
select count() from numbers(10) group by 'ab';

Expand Down
22 changes: 0 additions & 22 deletions tests/logictest/suites/base/03_dml/03_0004_select_order_by
Original file line number Diff line number Diff line change
Expand Up @@ -115,28 +115,6 @@ CREATE TABLE IF NOT EXISTS t3(id Int null, arr Array(Int32) null) Engine = Fuse;
statement ok
INSERT INTO t3 VALUES(1, [1,2,3]), (2, [1,2,4]), (3, []), (4, [3,4,5]), (5, [4]), (6, [4,5]);

statement query IT
SELECT id, arr FROM t3 ORDER BY arr ASC;

----
3 []
1 [1, 2, 3]
2 [1, 2, 4]
4 [3, 4, 5]
5 [4]
6 [4, 5]

statement query IT
SELECT id, arr FROM t3 ORDER BY arr DESC;

----
6 [4, 5]
5 [4]
4 [3, 4, 5]
2 [1, 2, 4]
1 [1, 2, 3]
3 []

statement ok
DROP TABLE t3;

Expand Down
4 changes: 2 additions & 2 deletions tests/logictest/suites/base/03_dml/03_0023_insert_into_array
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ statement ok
INSERT INTO t12 (id, arr) VALUES(1, ['2021-01-01', '2022-01-01']), (2, ['1990-12-01', '2030-01-12']);

statement error 1002
INSERT INTO t12 (id, arr) VALUES(3, ['1000000-01-01', '2000000-01-01']);
INSERT INTO t12 (id, arr) VALUES(3, ['1000000-01-01', '2000000-01-01']);

statement query IT
select * from t12;
Expand All @@ -268,7 +268,7 @@ statement ok
INSERT INTO t13 (id, arr) VALUES(1, ['2021-01-01 01:01:01', '2022-01-01 01:01:01']), (2, ['1990-12-01 10:11:12', '2030-01-12 22:00:00']);

statement error 1002
INSERT INTO t13 (id, arr) VALUES(3, ['1000000-01-01 01:01:01', '2000000-01-01 01:01:01']);
INSERT INTO t13 (id, arr) VALUES(3, ['1000000-01-01 01:01:01', '2000000-01-01 01:01:01']);

statement query IT
select * from t13;
Expand Down

0 comments on commit 2951f01

Please sign in to comment.