Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(16)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Issue 9943044: hebi: new simili-BI module

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by nicoe
Modified:
11 years, 4 months ago
Visibility:
Public.

Patch Set 1 #

Total comments: 14

Patch Set 2 : allow use of tree as first element #

Total comments: 3

Patch Set 3 : Use truncate instead of delete #

Patch Set 4 : Use truncate from python-sql #

Total comments: 1

Patch Set 5 : Remove reference to truncate #

Patch Set 6 : Add ignored branches #

Created: 11 years, 7 months ago
Download [raw] [tar.bz2]
Unified diffs Side-by-side diffs Delta from patch set Stats (+630 lines, --1 lines) Patch
A COPYRIGHT View 1 chunk +15 lines, -0 lines 0 comments Download
A INSTALL View 1 chunk +26 lines, -0 lines 0 comments Download
A LICENSE View 1 chunk +165 lines, -0 lines 0 comments Download
A README View 1 chunk +33 lines, -0 lines 0 comments Download
A hebi/__init__.py View 1 2 3 4 5 1 chunk +212 lines, -0 lines 0 comments Download
A hebi/tests/__init__.py View 0 chunks +-1 lines, --1 lines 0 comments Download
A hebi/tests/test_schema.py View 1 chunk +139 lines, -0 lines 0 comments Download
A setup.py View 1 chunk +41 lines, -0 lines 0 comments Download
Total messages: 15
|
nicoe
12 years, 7 months ago (2013年06月07日 14:28:32 UTC) #1
Sign in to reply to this message.
resteve
https://codereview.appspot.com/9943044/diff/1/setup.py File setup.py (right): https://codereview.appspot.com/9943044/diff/1/setup.py#newcode14 setup.py:14: description='Library to access Tryton server as a client', in ...
12 years, 7 months ago (2013年06月07日 14:44:09 UTC) #2
https://codereview.appspot.com/9943044/diff/1/setup.py
File setup.py (right):
https://codereview.appspot.com/9943044/diff/1/setup.py#newcode14
setup.py:14: description='Library to access Tryton server as a client',
in README I read: A library to create pre-computed tables
Sign in to reply to this message.
ced
12 years, 7 months ago (2013年06月07日 14:45:08 UTC) #3
Sign in to reply to this message.
udono
12 years, 7 months ago (2013年06月09日 09:49:41 UTC) #4
Sign in to reply to this message.
yangoon
12 years, 6 months ago (2013年07月06日 10:47:35 UTC) #5
Sign in to reply to this message.
ced
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py File hebi/__init__.py (right): https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode14 hebi/__init__.py:14: class ScalarColumn(sql.Column): Could be sql.Literal https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode32 hebi/__init__.py:32: class flat(Column): ...
12 years, 6 months ago (2013年07月08日 15:10:17 UTC) #6
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py
File hebi/__init__.py (right):
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode14
hebi/__init__.py:14: class ScalarColumn(sql.Column):
Could be sql.Literal
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode32
hebi/__init__.py:32: class flat(Column):
Flat
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode36
hebi/__init__.py:36: class relation(flat):
Relation
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode43
hebi/__init__.py:43: class tree(Column):
Tree
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode87
hebi/__init__.py:87: class leaf(Column):
Leaf
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode95
hebi/__init__.py:95: def __init__(self, prefix='', *columns):
I would separate grouping columns and leaf because leaf should always be at the
end.
So having this signature sounds less error prone:
Schema(grouping=(), aggregate=(), prefix='')
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode106
hebi/__init__.py:106: "{} should be a instance of Column".format(name))
an instance
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode107
hebi/__init__.py:107: self.cumulate = all(issubclass(l.operator,
CUMULATABLE_AGGREGATORS)
It should be better to have it as a property in case leafs is modified after the
instantiation.
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode110
hebi/__init__.py:110: def groupbys(self):
groupbys -> groupings
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode113
hebi/__init__.py:113: while level < len(keys):
for i, key in enumerate(keys):
 yield keys[:len(keys) - i]
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode127
hebi/__init__.py:127: def explode_table(self, table, cursor):
delete should always be run before any processing.
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode132
hebi/__init__.py:132: if isinstance(self.branches[groupby[-1]], tree):
I'm wondering if not tree could not be a simple case of tree?
https://codereview.appspot.com/9943044/diff/1/hebi/__init__.py#newcode183
hebi/__init__.py:183: for col_name in groupby + self.leafs.keys()]
This construction is based on the specific way of constructing
create_groupby_query.
I find having both in separate methods dangerous for maintenance to keep
consistency.
Sign in to reply to this message.
smarro
12 years, 6 months ago (2013年07月11日 01:09:10 UTC) #7
Sign in to reply to this message.
nicoe
12 years, 3 months ago (2013年09月24日 17:12:25 UTC) #8
Sign in to reply to this message.
ced
https://codereview.appspot.com/9943044/diff/15001/hebi/__init__.py File hebi/__init__.py (right): https://codereview.appspot.com/9943044/diff/15001/hebi/__init__.py#newcode161 hebi/__init__.py:161: print parents print statement https://codereview.appspot.com/9943044/diff/15001/hebi/__init__.py#newcode184 hebi/__init__.py:184: print '+' * ...
12 years, 3 months ago (2013年09月25日 15:09:17 UTC) #9
https://codereview.appspot.com/9943044/diff/15001/hebi/__init__.py
File hebi/__init__.py (right):
https://codereview.appspot.com/9943044/diff/15001/hebi/__init__.py#newcode161
hebi/__init__.py:161: print parents
print statement
https://codereview.appspot.com/9943044/diff/15001/hebi/__init__.py#newcode184
hebi/__init__.py:184: print '+' * 80
print stamenet
https://codereview.appspot.com/9943044/diff/15001/hebi/__init__.py#newcode189
hebi/__init__.py:189: print tuple(update_qry)
print stament
Sign in to reply to this message.
nicoe
12 years, 2 months ago (2013年10月17日 16:28:55 UTC) #10
Sign in to reply to this message.
ohuisman
12 years, 2 months ago (2013年10月20日 20:45:10 UTC) #11
Sign in to reply to this message.
nicoe
12 years, 2 months ago (2013年10月23日 15:37:59 UTC) #12
Sign in to reply to this message.
vvanderleun
Right now Hebi is not Python 2.6 compatible, while this is stated in setup.py. https://codereview.appspot.com/9943044/diff/47001/hebi/__init__.py ...
12 years, 2 months ago (2013年10月23日 16:36:56 UTC) #13
Right now Hebi is not Python 2.6 compatible, while this is stated in setup.py.
https://codereview.appspot.com/9943044/diff/47001/hebi/__init__.py
File hebi/__init__.py (right):
https://codereview.appspot.com/9943044/diff/47001/hebi/__init__.py#newcode97
hebi/__init__.py:97: self.leafs = collections.OrderedDict()
According to setup.py Hebi is supposed to be Python 2.6 compatible. OrderedDict
is not in collections in 2.6, but there's a drop-in replacement package
available [1]
I always patch hebi by adding "from collections OrderedDict" at the top unless
an ImportError is raised, and then try "from ordereddict import OrderedDict".
And I change all "collection.OrderedDict" references to just "OrderedDict".
[1] https://pypi.python.org/pypi/ordereddict 
Sign in to reply to this message.
ced
I think the tree column process could be replaced by a recursive SQL query that ...
11 years, 5 months ago (2014年08月05日 11:47:38 UTC) #14
I think the tree column process could be replaced by a recursive SQL query that
flatten the tree by duplicating each leaf for all his grand-parents.
With this kind of query the code of explode_table could be unified and simplier.
Sign in to reply to this message.
jean.cavallo
11 years, 4 months ago (2014年08月20日 15:17:31 UTC) #15
Sign in to reply to this message.
|
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /