kgyrtkirk commented on a change in pull request #988:
URL: https://github.com/apache/hive/pull/988#discussion_r415903603



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/DataSketchesFunctions.java
##########
@@ -128,14 +141,26 @@ private void buildCalciteFns() {
           OperandTypes.family(),
           unionFn);
 
+
       unionSFD.setCalciteFunction(unionFn);
       sketchSFD.setCalciteFunction(sketchFn);
+      if (estimateSFD != null) {
+        SqlFunction estimateFn = new HiveSqlFunction(estimateSFD.name,
+            SqlKind.OTHER_FUNCTION,
+            ReturnTypes.explicit(SqlTypeName.DOUBLE),

Review comment:
       it's a little bit more complicated than what we have at other places:
   
   * this should be run without anything being initialized - which means to get 
a "RexBuilder" I will need to construct that from the ground up....
   * after that I could start registering; but to do that I would need a 
FuinctionInfo which is created only after the function is "registered" 
   * and lastly: I have no info about what argument types the function is 
expecting (and how many) - when we construct these kind of things for other 
function we do have that...
   
   I somehow feel like I'm locked into a specific thinking right now
   
   




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to