You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by 温晨欣 <we...@qiniu.com> on 2017/05/04 02:53:18 UTC

Field name is not expected when use `AS` in sql expression

As shown above, when using the `SUM` expression in the SQL statement, the above problem occurs when using `AS`. The result record field is `$*`
 


 
Drill:  Apache-drill-1.11.0
 
Table:
 


 
CREATE TABLE `req_search` (
 
  `repo` text NOT NULL,
 
  `appid` text NOT NULL,
 
  `reqid` text NOT NULL,
 
  `respTime` bigint(20) NOT NULL,
 
  `respCode` bigint(20) NOT NULL,
 
  `time_by_day` text
 
) ENGINE=InnoDB DEFAULT CHARSET=utf8

Re: Field name is not expected when use `AS` in sql expression

Posted by Jinfeng Ni <jn...@apache.org>.
Looks like this user mailing list does not allow attached file. Can you
copy the output in text format and paste in email, so that people know what
you are referring to?



On Wed, May 3, 2017 at 7:53 PM, 温晨欣 <we...@qiniu.com> wrote:

>
>
>
> As shown above, when using the `SUM` expression in the SQL statement, the
> above problem occurs when using `AS`. The result record field is `$*`
>
>
> Drill:  Apache-drill-1.11.0
>
> Table:
>
>
> CREATE TABLE `req_search` (
>
>   `repo` text NOT NULL,
>
>   `appid` text NOT NULL,
>
>   `reqid` text NOT NULL,
>
>   `respTime` bigint(20) NOT NULL,
>
>   `respCode` bigint(20) NOT NULL,
>
>   `time_by_day` text
>
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8
>