You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/09/02 12:51:10 UTC
[GitHub] [arrow] projjal opened a new pull request #8095: ARROW-9897: Added to_date function
projjal opened a new pull request #8095:
URL: https://github.com/apache/arrow/pull/8095
signature: date64 to_date(utf8, utf8)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] praveenbingo closed pull request #8095: ARROW-9897: [C++][Gandiva] Added to_date function
Posted by GitBox <gi...@apache.org>.
praveenbingo closed pull request #8095:
URL: https://github.com/apache/arrow/pull/8095
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] praveenbingo commented on a change in pull request #8095: ARROW-9897: [C++][Gandiva] Added to_date function
Posted by GitBox <gi...@apache.org>.
praveenbingo commented on a change in pull request #8095:
URL: https://github.com/apache/arrow/pull/8095#discussion_r492681566
##########
File path: cpp/src/gandiva/to_date_holder.cc
##########
@@ -47,18 +47,23 @@ Status ToDateHolder::Make(const FunctionNode& node,
}
auto pattern = arrow::util::get<std::string>(literal_pattern->holder());
- auto literal_suppress_errors = dynamic_cast<LiteralNode*>(node.children().at(2).get());
- if (literal_pattern == nullptr) {
- return Status::Invalid(
- "'to_date' function requires a int literal as the third parameter");
+ int suppress_errors = 0;
+ if (node.children().size() == 3) {
+ auto literal_suppress_errors =
+ dynamic_cast<LiteralNode*>(node.children().at(2).get());
+ if (literal_pattern == nullptr) {
+ return Status::Invalid(
Review comment:
i think the error message can be improved a bit..something along lines of if third parameter is provided it needs to be an integer (to suppress errors (or) provide only two)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] github-actions[bot] commented on pull request #8095: ARROW-9897: [C++][Gandiva] Added to_date function
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #8095:
URL: https://github.com/apache/arrow/pull/8095#issuecomment-685723646
https://issues.apache.org/jira/browse/ARROW-9897
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] praveenbingo commented on a change in pull request #8095: ARROW-9897: [C++][Gandiva] Added to_date function
Posted by GitBox <gi...@apache.org>.
praveenbingo commented on a change in pull request #8095:
URL: https://github.com/apache/arrow/pull/8095#discussion_r492681566
##########
File path: cpp/src/gandiva/to_date_holder.cc
##########
@@ -47,18 +47,23 @@ Status ToDateHolder::Make(const FunctionNode& node,
}
auto pattern = arrow::util::get<std::string>(literal_pattern->holder());
- auto literal_suppress_errors = dynamic_cast<LiteralNode*>(node.children().at(2).get());
- if (literal_pattern == nullptr) {
- return Status::Invalid(
- "'to_date' function requires a int literal as the third parameter");
+ int suppress_errors = 0;
+ if (node.children().size() == 3) {
+ auto literal_suppress_errors =
+ dynamic_cast<LiteralNode*>(node.children().at(2).get());
+ if (literal_pattern == nullptr) {
+ return Status::Invalid(
Review comment:
i think the error message can be improved a bit..something along lines of if third parameter is provided it needs to be an integer (to suppress errors (or) provide only two)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org