Commit Graph

2565 Commits

Author SHA1 Message Date
Alexander Behm
2eb85f43d8 Now using Hive-style type casting.
we follow Hive's type casting behavior as described in:
http://wiki.apache.org/hadoop/Hive/Tutorial
summary of Hive's type casting:
implicit conversion is done from child to an ancestor,
in the type hierarchy.
Special case for STRING -> DOUBLE

we chose not to follow MySQL's type casting behavior as described here:
http://dev.mysql.com/doc/refman/5.0/en/type-conversion.html
for the following reasons:
conservative casting in arithmetic exprs: TINYINT + TINYINT -> BIGINT
comparison of many types as double: INT < FLOAT -> comparison as DOUBLE
special cases when dealing with dates and timestamps

Added the following unittests:
- all arithmetic ops with all implicit casts
- all comparison ops with all implicit casts
- string to date casts
- error messages
2011-06-17 18:06:56 -07:00
Marcel Kornacker
853493b2c3 analysis of on and using clauses, plus unit tests 2011-06-16 17:58:26 -07:00
Marcel Kornacker
b4329d78eb - addressed Carl's comments from last review
- created planner test framework plus one very basic test
- added debug and explain output to plan nodes; added debug output to (some) expr nodes
- fixed some bugs related to aggregation analysis; added new test cases
2011-06-16 17:55:58 -07:00
carl
f1dd662111 IMP-3. Add Eclipse launch configurations for Impala testcases 2011-06-14 13:26:35 -07:00
Alexander Behm
38dccb93b9 Fixed the following scanning/parsing issues:
1. Unmatched string literals are detected as a token and appropriately reported during parsing.
2. Enhanced error messages include the last encountered token, and a list of expected tokens.

I looked into the following issues, which I found are not really bugs:
1. Appearance of "^" in error messages seems incorrect in eclipse due to use of non fixed-width font. When displayed using a fixed-width font the error messages are fine (e.g. using System.err).
2. Tests for predicates with negation (!) pass after appropriate lines in parser generator are uncommented. The grammar looks good.
3. Tests for queries with order by pass.
2011-06-13 16:23:27 -07:00
carl
e0f626269e IMP-1. Fix Hive configuration for Impala tests 2011-06-10 22:43:43 -07:00
marcel
0d703b8470 Fixing aggregate analysis bug.
Adding AVG substitution
Adding a separate exception hierarchy (and retiring Analyzer.Exception).
Adding a planner shell.
Addressing Carl's review comments.
2011-06-10 13:42:15 -07:00
Patrick Hunt
2715f1d7f0 Adding rudimentary analysis functionality plus unit tests.
Adding a rudimentary catalog/metastore interface plus unit tests.
2011-06-09 11:55:52 -07:00
Patrick Hunt
13436fb6cc Added details to the README on how to run the parser.Main using mvn in development mode 2011-06-07 14:35:04 -07:00
Patrick Hunt
62bb27e31b Added command line parsing 2011-06-06 17:14:05 -07:00
Andrew Bayer
d6cb35fbd6 New version of maven-cup-plugin with everything working 2011-06-06 13:19:22 -07:00
Patrick Hunt
05499642ec Updated for Marcel's review comments 2011-06-06 13:18:50 -07:00
Patrick Hunt
efb7e83934 Cleanup of the build infrastructure
1) cleanup pom, in particular:
  a) remove jflex (unnecessary dependency)
  b) upgrade guavac to v09
  c) commented out the assembly for now
  d) don't use snapshot versions of hadoop
  e) specify use of java 1.6 over defaults
  f) have surefure capture the test output to a file for easier review
2) added a README to help new developers
3) added a .gitignore
2011-06-06 13:18:33 -07:00
Patrick Hunt
8b130c37bc Changes to fix a problem with shortbus CUP plugin (didn't generation package directory properly). 2011-06-06 13:17:35 -07:00
Marcel Kornacker
ff54fdce61 Initial version of parser 2011-05-23 15:28:19 -07:00