[ 
https://issues.apache.org/jira/browse/HIVE-23941?focusedWorklogId=465086&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-465086
 ]

ASF GitHub Bot logged work on HIVE-23941:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Jul/20 16:25
            Start Date: 31/Jul/20 16:25
    Worklog Time Spent: 10m 
      Work Description: scarlin-cloudera commented on a change in pull request 
#1326:
URL: https://github.com/apache/hive/pull/1326#discussion_r463708180



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/parse/type/HiveFunctionHelper.java
##########
@@ -545,4 +551,67 @@ public RexNode foldExpression(RexNode expr) {
     return result.get(0);
   }
 
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean isAndFunction(FunctionInfo fi) {
+    return fi.getGenericUDF() instanceof GenericUDFOPAnd;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean isOrFunction(FunctionInfo fi) {
+    return fi.getGenericUDF() instanceof GenericUDFOPOr;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean isInFunction(FunctionInfo fi) {
+    return fi.getGenericUDF() instanceof GenericUDFIn;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean isCompareFunction(FunctionInfo fi) {
+    return fi.getGenericUDF() instanceof GenericUDFBaseCompare;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean isEqualFunction(FunctionInfo fi) {
+    return fi.getGenericUDF() instanceof GenericUDFOPEqual
+        && !(fi.getGenericUDF() instanceof GenericUDFOPEqualNS);
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean isConsistentWithinQuery(FunctionInfo fi) {
+    //TODO: don't getGenericUDF
+    return FunctionRegistry.isConsistentWithinQuery(fi.getGenericUDF());
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean isStateful(FunctionInfo fi) {
+    //TODO: don't getGenericUDF

Review comment:
       I didn't clean this up before your review (as noted by extra files, 
etc...) since I originally intended the review to be more architectural, but 
we're past that point now.  My apologies for this and other simple fixes.
   
   No, there is no TODO here, it was a heads-up for me that was taken care of.




----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 465086)
    Time Spent: 0.5h  (was: 20m)

> Refactor TypeCheckProcFactory to be database agnostic
> -----------------------------------------------------
>
>                 Key: HIVE-23941
>                 URL: https://issues.apache.org/jira/browse/HIVE-23941
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>            Reporter: Steve Carlin
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Part of the code has already been refactored to become database agnostic 
> (i.e. HiveFunctionHelper).  
> Further refactoring needs to be done on TypeCheckProcFactory which also 
> should be database agnostic.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to