hubgeter commented on code in PR #40695:
URL: https://github.com/apache/doris/pull/40695#discussion_r1756583985


##########
be/src/vec/functions/function_timestamp.cpp:
##########
@@ -1182,6 +1184,139 @@ class FunctionOtherTypesToDateType : public IFunction {
     }
 };
 
+struct FromIso8601DateV2 {
+    static constexpr auto name = "from_iso8601_date";
+
+    static bool is_variadic() { return true; } //todo : check is or not 
is_variadic
+
+    static DataTypes get_variadic_argument_types() { return 
{std::make_shared<DataTypeString>()}; }
+
+    static DataTypePtr get_return_type_impl(const DataTypes& arguments) {
+        return make_nullable(std::make_shared<DataTypeDateV2>());
+    }
+
+    static Status execute(FunctionContext* context, Block& block, const 
ColumnNumbers& arguments,
+                          size_t result, size_t input_rows_count) {
+        const auto* src_column_ptr = 
block.get_by_position(arguments[0]).column.get();
+
+        std::regex calendar_regex(R"((\d{4})(-)?(\d{2})(-)?(\d{2}))"); // 
YYYY-MM-DD or YYYYMMDD

Review Comment:
   i will change it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to