[ https://issues.apache.org/jira/browse/HIVE-23031?focusedWorklogId=427672&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-427672 ]
ASF GitHub Bot logged work on HIVE-23031: ----------------------------------------- Author: ASF GitHub Bot Created on: 27/Apr/20 15:18 Start Date: 27/Apr/20 15:18 Worklog Time Spent: 10m Work Description: 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 427672) Time Spent: 1.5h (was: 1h 20m) > Add option to enable transparent rewrite of count(distinct) into sketch > functions > --------------------------------------------------------------------------------- > > Key: HIVE-23031 > URL: https://issues.apache.org/jira/browse/HIVE-23031 > Project: Hive > Issue Type: Sub-task > Reporter: Zoltan Haindrich > Assignee: Zoltan Haindrich > Priority: Major > Attachments: HIVE-23031.01.patch, HIVE-23031.02.patch, > HIVE-23031.03.patch, HIVE-23031.03.patch, HIVE-23031.03.patch > > Time Spent: 1.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)