I realize this is in fact quite related to another thread that I recently started: https://lists.apache.org/thread/s0pzmgmq6trdjtxc50qwpww2dlzxql9b So this discussion could continue there.
On 2022/04/30 04:08:27 Julien Phalip wrote: > I've noticed that the DefaultHiveMetaHook > < https://github.com/apache/hive/blob/release-3.1.2-rc0/standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/DefaultHiveMetaHook.java#L32 > > class has a commitInsertTable(Table table, boolean overwrite) method. So > perhaps this is the method that I should plug in to detect the proper write > mode before pushing data to the output table? > > If so, by chance is there any way to somehow access the JobConf in that > method? > > It looks like the DruidStorageHandler > < https://github.com/apache/hive/blob/release-3.1.2-rc0/druid-handler/src/java/org/apache/hadoop/hive/druid/DruidStorageHandler.java#L806 > > uses that method, so I'll have to dive into that a bit more. > > Thanks, > > Julien > > On 2022/04/30 00:44:44 Julien Phalip wrote: > > Hi, > > > > I'm working on a custom storage handler and am wondering if there's a way > > to detect the appropriate write mode for the output table. For example, an > > "INSERT" statement is expected to append rows to the table, whereas an > > "INSERT OVERWRITE" statement should first clear the table before adding > new > > rows. > > > > Is there a way to tell which mode to use, either from the JobConf or any > > other means? > > > > Thanks, > > > > Julien > > >