mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-08-18 03:58:29 +00:00
feat: Initial support of postgresql wire protocol (#229)
* feat: initial commit of postgres protocol adapter * initial commit of postgres server * feat: use common_io runtime and correct testcase * fix previous tests * feat: adopt pgwire api changes and add support for text encoded data * feat: initial integration with datanode * test: add feature flag to test * fix: resolve lint warnings * feat: add postgres feature flags for datanode * feat: add support for newly introduced timestamp type * feat: adopt latest datanode changes * fix: address clippy warning for flattern scenario * fix: make clippy great again * fix: address issues found in review * chore: sort dependencies by name * feat: adopt new Output api * fix: return error on unsupported data types * refactor: extract common code dealing with record batches * fix: resolve clippy warnings * test: adds some unit tests postgres handler * test: correct test for cargo update * fix: update query module name * test: add assertion for error content
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#[cfg(any(test, feature = "test"))]
|
||||
use crate::data_type::ConcreteDataType;
|
||||
|
||||
/// Unique identifier for logical data type.
|
||||
|
||||
@@ -268,6 +268,7 @@ impl MutableVector for ListVectorBuilder {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use arrow::array::{MutableListArray, MutablePrimitiveArray, TryExtend};
|
||||
use serde_json::json;
|
||||
|
||||
use super::*;
|
||||
use crate::types::ListType;
|
||||
@@ -426,8 +427,8 @@ mod tests {
|
||||
|
||||
let list_vector = ListVector::from(arrow_array);
|
||||
assert_eq!(
|
||||
"Ok([Array([Number(1), Number(2), Number(3)]), Null, Array([Number(4), Null, Number(6)])])",
|
||||
format!("{:?}", list_vector.serialize_to_json())
|
||||
vec![json!([1, 2, 3]), json!(null), json!([4, null, 6]),],
|
||||
list_vector.serialize_to_json().unwrap()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user