[feature](function)Support function "current_date" in FE (#11702)
Issue Number: close #11699
This commit is contained in:
@ -255,6 +255,11 @@ public class FEFunctions {
|
||||
ScalarType.getDefaultDateType(Type.DATE));
|
||||
}
|
||||
|
||||
@FEFunction(name = "current_date", argTypes = {}, returnType = "DATE")
|
||||
public static DateLiteral currentDate() {
|
||||
return curDate();
|
||||
}
|
||||
|
||||
@FEFunction(name = "curtime", argTypes = {}, returnType = "TIME")
|
||||
public static FloatLiteral curTime() throws AnalysisException {
|
||||
DateLiteral now = now();
|
||||
|
||||
@ -122,6 +122,10 @@ public class ConstantExpressTest {
|
||||
testConstantExpressResult(
|
||||
"select current_time();",
|
||||
"");
|
||||
|
||||
testConstantExpressResult(
|
||||
"select current_date();",
|
||||
"");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user