Comments (5)
You need to add extra functionality in process_sql.py
Look for AGG_OPS
global variable and its' usages. Functions can be implemented the same way, but you'll also need to support comma symbol.
from spider.
You need to add extra functionality in
process_sql.py
Look forAGG_OPS
global variable and its' usages. Functions can be implemented the same way, but you'll also need to support comma symbol.
Thankyou so much for replying
one more question, like the AGG_OPS, have some limited functions, but the MySQL or other databases has lots of functions, so should i have to put all of them in a predefined variable?
And also the comma you are talking ablut, can you elaborate more, like whats the role of it?
from spider.
Yes, you should put all the functions in predefined variable. I think you can start with simply extending AGG_OPS with your function (e.g. date_format
) but I don't guarantee you that everything would work as expected as this function has two parameters.
Talking about comma: I think that it may be interpreted incorrectly by the whole parser as currently comma is used only in Select query to separate columns and not to separate parameters of functions (this may mean that there's some code like: split select part by comma and parse each part with easier parser, which would lead to incorrect results because it would simply split date_format call into two separate strings and will try to analyze each of them independently and fail.
from spider.
Oh, thanks, alot for your suggestion, it seems like a lot of work. I have to be very precise on writing the code, specifically for handling the function parameters.
I'll try to make it worked.
from spider.
Hi @CrafterKolyan i tried to write the code that support functions, but i was facing the many difficulties, like to differentiate between the blocks DATE_FORMAT(date_complaint_raised,'%Y-%m')
and Count(*)
, parser getting confused , like which is what. Can you please help in it?
from spider.
Related Issues (20)
- What is license of this dataset?
- Mistake in query 542 and 543 from dev_gold.sql
- Minor typo in query 362 and 363 from dev_gold.sql (change korea -> Korea)
- Incorrect value in order_items table (customers_and_products_contacts set)
- Incorrect query in dev HOT 2
- Unable to submit source code due to IP issue
- Table Financial_Transactions in database, customers_and_invoices\customers_and_invoices.sqlite doesn't have a primary key in the database
- Incorrect SQL - World_1 database -for- "Count the number of countries for which Spanish is the predominantly spoken language."
- Scripts for processing train_others.json
- Instance 1222 in train json
- [Bug] Training Instance 3153, gold query refers to a table that doesn't exist in the db. HOT 5
- The results are inconsistent with the notes
- Tokenize new data HOT 3
- Exact Match for JOINs without the ON clause
- I couldn't find any measure of query difficulty in the Spider dataset HOT 3
- how is the test data generate?
- WHERE IN Clause for Multiple Values NOT Supported (where country in ('A','B','C','D') while Parsing HOT 1
- get_tables.py HOT 1
- Noob question about dev.json HOT 1
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 spider.