[ https://issues.apache.org/jira/browse/HIVE-21238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765391#comment-16765391 ]
Miklos Gergely edited comment on HIVE-21238 at 2/11/19 10:35 PM: ----------------------------------------------------------------- [~vgarg] I agree that this is not the best method, it would be much better if the function itself could get it from some sort of context (MapredContext maybe?). Unfortunately I don't see how it could be done at the moment. When I've implemented this function we faced the same issue, and at the end we chose this not-so-good solution. I'll create a Jira for the improvement of this. GenericUdfSurrogateKey can not be tested in the q file test envrionment as there is no write id present in that environment. was (Author: mgergely): [~vgarg] I agree that this is not the best method, it would be much better if the function itself could get it from some sort of context. Unfortunately I don't see how it could be done at the moment. When I've implemented this function we faced the same issue, and at the end we chose this not-so-good solution. I'll create a Jira for the improvement of this. > Fix Surrogate Key issue > ----------------------- > > Key: HIVE-21238 > URL: https://issues.apache.org/jira/browse/HIVE-21238 > Project: Hive > Issue Type: Bug > Components: HiveServer2 > Affects Versions: 3.0.0 > Reporter: Miklos Gergely > Assignee: Miklos Gergely > Priority: Major > Fix For: 3.0.1 > > Attachments: HIVE-21238.01.patch, HIVE-21238.02.patch > > > When SemanticAnalyzer is trying to set the write id for the surrogate key > function it is looking for such functions only in the main operator, while it > should also look for it in it's parents. -- This message was sent by Atlassian JIRA (v7.6.3#76005)