Comments (3)
I may have open this issue prematurely... I have been doing some experimentation no a local clone and I have a better understanding of what is going on.
I tried enabling DEBUG
on a local clone and noticed that pyparsing will print all exceptions to stdout. I assume that is why the the pyparsing default is overwritten when DEBUG
is false.
I tried the following with DEBUG = False
:
if DEBUG:
debug = (None, None, None)
else:
debug = (nothing, nothing, nothing)
I got a test failure, and I know that it would break this however it fixed my memory issue:
Dicts and tuples stopped growing. ParseException didn't even register as a common type. The overall memory footprint of my application fell from roughly 1GB per loop iteration to holding steady at 60MB.
It's possible that my use case is unique. I am working on a programming-by-example AI project that synthesizes sql queries. It requires parsing thousands (maybe millions) of generated sql queries, and thus the cost of accumulating the ParseExceptions is high.
I can understand if this is not something you want to officially address in the project, however it would be nice to somehow make record_exception
optional.
from moz-sql-parser.
Excellent find! Thank you!
from moz-sql-parser.
Fixed here: 9e97eae?w=1
thank you very much!
from moz-sql-parser.
Related Issues (20)
- What would be the right approach to customise the supported grammar here? HOT 1
- parse failed in this kind of query.
- Interactive usage with jupyterlab fails
- Customizing the SQL parser definition HOT 2
- Parse a sql, format the tokens back to sql, gives syntax invalid query HOT 4
- Is there any plans to use latest version of pyparsing? HOT 2
- Cannot recognize literals when using with an operator HOT 2
- parsing issue for oracle window function HOT 2
- offset can not parse when using order by HOT 1
- Parsing "Select B = A from dual" (which is valid in SQL Server) like "Select A as B from dual" HOT 3
- square brackets are not accepted: "Select [A] from dual"
- (py)parser enters infinite recursion loop with WHERE clause enclosed with parenthesis HOT 2
- DEVELOPMENT MOVED TO klahnakoski HOT 1
- Travis CI free usage ends Dec 3; mozilla repos should switch to other CI platforms
- New failing test cases from a Redshift user (part 1) HOT 5
- Select CASE with NULL is formatted to None in the sql HOT 6
- Update queries is not working HOT 1
- Expecting StringEnd, found "xxx" (at char 388, (line:1, col:389) HOT 2
- Broken at import HOT 9
- Parser not working HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moz-sql-parser.