Github user xunzhang commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/976#discussion_r85255575
--- Diff: tools/bin/hawqregister ---
@@ -778,45 +802,67 @@ class HawqRegister(object):
append_eofs = self.sizes_append
update_eofs = self.sizes_update
same_path_eofs = self.sizes_same_path
+ append_tupcounts = self.tupcounts_append
+ update_tupcounts = self.tupcounts_update
+ same_path_tupcounts = self.tupcounts_same_path
+ append_eofuncompresseds = self.eofuncompresseds_append
+ update_eofuncompresseds = self.eofuncompresseds_update
+ same_path_eofuncompresseds = self.eofuncompresseds_same_path
+ append_varblockcounts = self.varblockcounts_append
+ update_varblockcounts = self.varblockcounts_update
+ same_path_varblockcounts = self.varblockcounts_same_path
update_segno_lst = [f.split('/')[-1] for f in self.files_update]
same_path_segno_lst = [seg for seg in self.segnos_same_path]
query = ""
+
if mode == 'force':
query += "delete from pg_aoseg.%s;" % (self.seg_name)
if self.file_format == 'Parquet':
if len(update_eofs) > 0:
- query += 'insert into pg_aoseg.%s values(%s, %d, %d, %d)'
% (self.seg_name, update_segno_lst[0], update_eofs[0], -1, -1)
- for k, update_eof in enumerate(update_eofs[1:]):
- query += ',(%s, %d, %d, %d)' % (update_segno_lst[k +
1], update_eof, -1, -1)
+ query += 'insert into pg_aoseg.%s values(%s, %d, %d, %d)'
% (self.seg_name, update_segno_lst[0], update_eofs[0], update_tupcounts[0],
update_eofuncompresseds[0])
+ k = 0
--- End diff --
I do not like this C-style implementation..
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---