Class HiveUpdateProcessor


  • public class HiveUpdateProcessor
    extends Object
    • Method Detail

      • mergeWithNonUpdatedColumns

        public List<HiveColumnHandle> mergeWithNonUpdatedColumns​(List<HiveColumnHandle> updateDependencies)
        Merge the non-updated columns with the update dependencies, in allDataColumns order, and finally add the rowId column as the last dependency.
      • createUpdateRowBlock

        public Block createUpdateRowBlock​(Page page,
                                          List<Integer> nonUpdatedChannelNumbers,
                                          OrcDeletedRows.MaskDeletedRowsFunction maskDeletedRowsFunction)
        Create a RowBlock containing four children: the three ACID columns - - originalTransaction, rowId, bucket - - and a RowBlock containing all the data columns not changed by the UPDATE statement.
      • removeNonDependencyColumns

        public Page removeNonDependencyColumns​(Page page,
                                               List<Integer> dependencyChannels)
        Project expects the page to begin with the update dependencies, followed by the "rowId" column. Remove columns from the page if they are not update dependencies.
      • getUpdateRowIdColumnHandle

        public static HiveColumnHandle getUpdateRowIdColumnHandle​(List<HiveColumnHandle> nonUpdatedColumnHandles)
        Return the column UPDATE column handle, which depends on the 3 ACID columns as well as the non-updated columns.
      • createMergedColumnsBlock

        public Block createMergedColumnsBlock​(Page page,
                                              List<Integer> columnValueAndRowIdChannels)
        Parameters:
        page - The first block in the page is a RowBlock, containing the three ACID columns - - originalTransaction, bucket and rowId - - plus a RowBlock containing the values of non-updated columns. The remaining blocks are the values of the updated columns, whose offsets given by columnValueAndRowIdChannels
        Returns:
        The RowBlock for updated and non-updated columns