handlers.part: clarify COPY expression with braces
authorMarko Kreen <markokr@gmail.com>
Tue, 5 Jun 2012 08:23:33 +0000 (11:23 +0300)
committerMarko Kreen <markokr@gmail.com>
Tue, 5 Jun 2012 08:23:33 +0000 (11:23 +0300)
python/londiste/handlers/part.py

index 8bf70f530403004bf0c9f1fae53c2cbc61c65c4b..6530d03d76a3fd5210a92c65bb34370de64e8e2e 100644 (file)
@@ -78,7 +78,7 @@ class PartHandler(TableHandler):
     def real_copy(self, tablename, src_curs, dst_curs, column_list, cond_list):
         """Copy only slots needed locally."""
         self.load_part_info(dst_curs)
-        w = "%s & %d = %d" % (self.hashexpr, self.max_part, self.local_part)
+        w = "(%s & %d) = %d" % (self.hashexpr, self.max_part, self.local_part)
         self.log.debug('part: copy_condition=%s' % w)
         cond_list.append(w)