fix: Normalize default constrain fn name (#2737)

* fix: normalize current_timestamp to current_timestamp()

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* add sqlness case

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix clippy lints

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2023-11-14 11:22:23 +08:00
committed by GitHub
parent 506e6887f3
commit 8f3b299a45
6 changed files with 66 additions and 5 deletions

View File

@@ -13,7 +13,7 @@
// limitations under the License.
mod column_schema;
mod constraint;
pub mod constraint;
mod raw;
use std::collections::HashMap;

View File

@@ -24,9 +24,9 @@ use crate::value::Value;
use crate::vectors::operations::VectorOp;
use crate::vectors::{TimestampMillisecondVector, VectorRef};
const CURRENT_TIMESTAMP: &str = "current_timestamp";
const CURRENT_TIMESTAMP_FN: &str = "current_timestamp()";
const NOW_FN: &str = "now()";
pub const CURRENT_TIMESTAMP: &str = "current_timestamp";
pub const CURRENT_TIMESTAMP_FN: &str = "current_timestamp()";
pub const NOW_FN: &str = "now()";
/// Column's default constraint.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]