You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2022/03/15 11:28:43 UTC

[incubator-linkis] branch dev-1.1.1 updated: Dev 1.1.1 run date variables (#1733)

This is an automated email from the ASF dual-hosted git repository.

peacewong pushed a commit to branch dev-1.1.1
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.1.1 by this push:
     new b1410c6  Dev 1.1.1 run date variables (#1733)
b1410c6 is described below

commit b1410c6ea61cc7c379fcb972ce118477e1aa0bc9
Author: Shang <no...@live.com>
AuthorDate: Tue Mar 15 19:28:36 2022 +0800

    Dev 1.1.1 run date variables (#1733)
    
    * closes #1732 [entrance] support more run_date based variables
    
    * [entrance] fixed typo
---
 .../entrance/interceptor/impl/CustomVariableUtils.scala   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/interceptor/impl/CustomVariableUtils.scala b/linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/interceptor/impl/CustomVariableUtils.scala
index d69c436..208e668 100644
--- a/linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/interceptor/impl/CustomVariableUtils.scala
+++ b/linkis-computation-governance/linkis-entrance/src/main/scala/org/apache/linkis/entrance/interceptor/impl/CustomVariableUtils.scala
@@ -164,6 +164,21 @@ object CustomVariableUtils extends Logging {
     nameAndType("run_month_end") = MonthType(new CustomMonthType(run_date.toString, false, true))
     nameAndType("run_month_end_std") = MonthType(new CustomMonthType(run_date.toString, true, true))
 
+    nameAndType("run_quarter_begin") = QuarterType(new CustomQuarterType(run_date.toString, false))
+    nameAndType("run_quarter_begin_std") = QuarterType(new CustomQuarterType(run_date.toString))
+    nameAndType("run_quarter_end") = QuarterType(new CustomQuarterType(run_date.toString, false, true))
+    nameAndType("run_quarter_end_std") = QuarterType(new CustomQuarterType(run_date.toString, true, true))
+
+    nameAndType("run_half_year_begin") = HalfYearType(new CustomHalfYearType(run_date.toString, false))
+    nameAndType("run_half_year_begin_std") = HalfYearType(new CustomHalfYearType(run_date.toString))
+    nameAndType("run_half_year_end") = HalfYearType(new CustomHalfYearType(run_date.toString, false, true))
+    nameAndType("run_half_year_end_std") = HalfYearType(new CustomHalfYearType(run_date.toString, true, true))
+
+    nameAndType("run_year_begin") = YearType(new CustomYearType(run_date.toString, false))
+    nameAndType("run_year_begin_std") = YearType(new CustomYearType(run_date.toString))
+    nameAndType("run_year_end") = YearType(new CustomYearType(run_date.toString, false, true))
+    nameAndType("run_year_end_std") = YearType(new CustomYearType(run_date.toString, true, true))
+
     /*
     calculate run_today based on run_date
     */

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org