forked from apache/horaedb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: base implementation of default value (apache#246)
* feat: base implemment of default value * Add some unit tests * Make lint happy * replace CastExpr with TryCastExpr when filling default value * Update df_operator/src/visitor.rs Co-authored-by: Ruihang Xia <waynestxia@gmail.com> * Update interpreters/src/insert.rs Co-authored-by: Ruihang Xia <waynestxia@gmail.com> * Update sql/src/plan.rs Co-authored-by: Ruihang Xia <waynestxia@gmail.com> * Add integration tests * Fix minor comments * Fix integration test * Merge remote-tracking branch 'upstream/main' into simple-default-value * Fix minor comments * Improve conversion from Output to inner records Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
- Loading branch information
Showing
25 changed files
with
769 additions
and
89 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2022 CeresDB Project Authors. Licensed under Apache-2.0. | ||
|
||
use arrow_deps::arrow::util::pretty; | ||
use common_types::record_batch::RecordBatch; | ||
|
||
/// A helper function to assert record batch. | ||
pub fn assert_record_batches_eq(expected: &[&str], record_batches: Vec<RecordBatch>) { | ||
let arrow_record_batch = record_batches | ||
.into_iter() | ||
.map(|record| record.into_arrow_record_batch()) | ||
.collect::<Vec<_>>(); | ||
|
||
let expected_lines: Vec<String> = expected.iter().map(|&s| s.into()).collect(); | ||
let formatted = pretty::pretty_format_batches(arrow_record_batch.as_slice()) | ||
.unwrap() | ||
.to_string(); | ||
let actual_lines: Vec<&str> = formatted.trim().lines().collect(); | ||
assert_eq!( | ||
expected_lines, actual_lines, | ||
"\n\nexpected:\n\n{:#?}\nactual:\n\n{:#?}\n\n", | ||
expected_lines, actual_lines | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ pub mod registry; | |
pub mod scalar; | ||
pub mod udaf; | ||
pub mod udfs; | ||
pub mod visitor; |
Oops, something went wrong.