ackelcn created DERBY-7083:
------------------------------
Summary: A rotten comment in VectorizationContext.java
Key: DERBY-7083
URL: https://issues.apache.org/jira/browse/DERBY-7083
Project: Derby
Issue Type: Bug
Reporter: ackelcn
When I read the code of VectorizationContext.java, I found four references to
HIVE-7421, and a comment is as follows:
{code:java}
private VectorExpression getCastToChar(List<ExprNodeDesc> childExpr, TypeInfo
returnType)
throws HiveException {
ExprNodeDesc child = childExpr.get(0);
String inputType = childExpr.get(0).getTypeString();
if (child instanceof ExprNodeConstantDesc) {
// Don't do constant folding here. Wait until the optimizer is changed
to do it.
// Family of related JIRAs: HIVE-7421, HIVE-7422, and HIVE-7424.
return null;
}
...
}{code}
The comment mentions HIVE-7421--. I found that HIVE-7421 modified
VectorUDFDateString.java, and the patch is as follows:
{code:java}
@@ -41,13 +45,10 @@
return null;
}
try {
- Date date = Date.valueOf(s.toString());
- t.set(date.toString());
+ Date date = formatter.parse(s.toString());
+ t.set(formatter.format(date));
return t;
- } catch (IllegalArgumentException e) {
- if (LOG.isDebugEnabled()) {
- LOG.info("VectorUDFDateString passed bad string for Date.valueOf
'" + s.toString() + "'");
- }
+ } catch (ParseException e) {
return null;
{code}
The patch modified the evaluate method. However, the method is already
deteleted in the latest version.
I am wondering whether VectorizationContext.java mentions a rotten issue
report (HIVE-7421), in that all the modifications of this issue do not appear
in the latest version.
Would you please check the problem? If it is, the reference of HIVE-7421 shall
be removed from the comment of VectorizationContext.java.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)