Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example 1 fails (OS X) #15

Closed
bmayer0122 opened this issue Jan 6, 2014 · 4 comments
Closed

Example 1 fails (OS X) #15

bmayer0122 opened this issue Jan 6, 2014 · 4 comments
Assignees

Comments

@bmayer0122
Copy link

$ ls -ltr * | q "select c1,count(1) from - group by c1"
Traceback (most recent call last):
File "/usr/local/bin/q", line 485, in
table_creator.populate()
File "/usr/local/bin/q", line 379, in populate
self._flush_inserts()
File "/usr/local/bin/q", line 415, in _flush_inserts
self.db.execute_and_fetch(insert_row_stmt)
File "/usr/local/bin/q", line 111, in execute_and_fetch
self.cursor.execute(q)
sqlite3.OperationalError: near ")": syntax error

@harelba
Copy link
Owner

harelba commented Jan 6, 2014

Thanks for pointing it out! It's a bug in the ls flags i've provided. fixing now.

@harelba
Copy link
Owner

harelba commented Jan 6, 2014

Fixed. The ls command should include the -d flag:
$ ls -ltrd * | q "select c1,count(1) from - group by c1"

Not using the -d flag causes the ls output to descend to directories and be non-tabular in nature. Besides, I need to make error display better (already have a ticket on this).

I've just pushed the fix, but if you're using homebrew in order to download it, then you'll still be getting the old version. I'll bump the version numbers in the homebrew formula.

@ghost ghost assigned harelba Jan 6, 2014
@harelba
Copy link
Owner

harelba commented Jan 6, 2014

homebrew formula updated to version 1.1, which includes this fix - Will update when homebrew will integrate the pull request.

@harelba
Copy link
Owner

harelba commented Jan 7, 2014

Pull request for homebrew formula has been merged. q v1.1 will now be installed when using homebrew, fixing the issue.

@bmayer0122 Thanks for noting this.

@harelba harelba closed this as completed Jan 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants