Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill >> mail # dev >> Re: [jira] [Commented] (DRILL-159) 1.sql


Copy link to this message
-
Re: [jira] [Commented] (DRILL-159) 1.sql
org.eigenbase.sql.validate.ListScope.findQualifyingTableName() method.

loop at #112, returning count as 0.

switch at #119,
org.eigenbase.sql.validate.EmptyScope.findQualifyingTableName() = always throws exception.

in simple terms, RETURNFLAG is not translating to LINEITEM.RETURNFLAG by QualifyingTableName().

Ted: l_returnflag in the TPC-H original query and for reference in Jira description only.
In JUnit class, I pass it as 'returnFlag'.
V
________________________________
 From: Ted Dunning <[EMAIL PROTECTED]>
To: drill <[EMAIL PROTECTED]>; Sree V <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2013 12:11 AM
Subject: Re: [jira] [Commented] (DRILL-159) 1.sql
 

The query uses l_returnflag but the data line has returnFlag.

Is that significant?

On Mon, Jul 29, 2013 at 11:14 PM, Sree V <[EMAIL PROTECTED]> wrote:

> Any thoughts/pointers, Julian.
>
> V
>
>
>
> ________________________________
>  From: Sree Vaddi (JIRA) <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Sent: Monday, July 29, 2013 11:11 PM
> Subject: [jira] [Commented] (DRILL-159) 1.sql
>
>
>
>     [
> https://issues.apache.org/jira/browse/DRILL-159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13723459#comment-13723459]
>
> Sree Vaddi commented on DRILL-159:
> ----------------------------------
>
> First run of sqlparser:org.apache.drill.jdbc.test.LineItemTest
>
> Jul 29, 2013 10:59:48 PM org.eigenbase.sql.validate.SqlValidatorException
> <init>
> SEVERE: org.eigenbase.sql.validate.SqlValidatorException: Column
> 'RETURNFLAG' not found in any table
> Jul 29, 2013 10:59:48 PM org.eigenbase.util.EigenbaseException <init>
> SEVERE: org.eigenbase.util.EigenbaseContextException: From line 1, column
> 417 to line 1, column 426
>
>
> > 1.sql
> > -----
> >
> >                 Key: DRILL-159
> >                 URL: https://issues.apache.org/jira/browse/DRILL-159
> >             Project: Apache Drill
> >          Issue Type: Sub-task
> >            Reporter: Sree Vaddi
> >            Assignee: Sree Vaddi
> >
> > TPC-H Queries: 1.sql
> > Original Query:
> > -- $ID$
> > -- TPC-H/TPC-R Pricing Summary Report Query (Q1)
> > -- Functional Query Definition
> > -- Approved February 1998
> > :x
> > :o
> > select
> >         l_returnflag,
> >         l_linestatus,
> >         sum(l_quantity) as sum_qty,
> >         sum(l_extendedprice) as sum_base_price,
> >         sum(l_extendedprice * (1 - l_discount)) as sum_disc_price,
> >         sum(l_extendedprice * (1 - l_discount) * (1 + l_tax)) as
> sum_charge,
> >         avg(l_quantity) as avg_qty,
> >         avg(l_extendedprice) as avg_price,
> >         avg(l_discount) as avg_disc,
> >         count(*) as count_order
> > from
> >         lineitem
> > where
> >         l_shipdate <= date '1998-12-01' - interval ':1' day (3)
> > group by
> >         l_returnflag,
> >         l_linestatus
> > order by
> >         l_returnflag,
> >         l_linestatus;
> > :n -1
> > In java:
> >     private static final String sql_1 > >         "select "
> >         + "returnFlag, lineStatus,"
> >         + "sum(quantity) as sum_qty,"
> >         + "sum(extendedPrice) as sum_base_price,"
> >         + "sum(extendedPrice * (1 - discount)) as sum_disc_price,"
> >         + "sum(extendedPrice * (1 - discount) * (1 + tax)) as
> sum_charge,"
> >         + "avg(quantity) as avg_qty,"
> >         + "avg(extendedPrice) as avg_price,"
> >         + "avg(discount) as avg_disc,"
> >         + "count(*) as count_order "
> >         + "from "
> >         + "lineitem "
> >         + "where "
> >         + "shippingDate <= date '1998-12-01' - interval '" + (60 *
> Math.random() + 60) + "' day (3) "
> >         + "group by "
> >         + "returnFlag,"
> >         + "lineStatus "
> >         + "order by "
> >         + "returnflag,"
> >         + "lineStatus";
> > Sample record in json: (first line in lineitem.tbl.1)
> > {
> >    "orderKey":"1",
> >    "partKey":"155190",
> >    "supplierKey":"7706",
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB