You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Amir Kafri <am...@datorama.com> on 2017/03/28 07:25:37 UTC

Wrong alias name in Window function

Hi All,

I think I've encountered a bug:

I'm running the following query:

SELECT
   metric AS m,
   COUNT(*) OVER() AS row_counter
FROM t

The result is correct, but the name of the 2nd column in the result set is
w0$o0.

If I switch the order in the SELECT:
SELECT
   COUNT(*) OVER() AS row_counter,
    metric AS m
FROM t

then the column names are correct (row_counter, m).


-- 

*Amir Kafri*Data Engineer


*datorama*All Your *Data*, Working Together
*.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
*E* amirk@datorama.com
*Website <http://www.datorama.com/> | LinkedIn
<https://www.linkedin.com/company/datorama> | Twitter
<https://twitter.com/datorama> | Facebook
<https://www.facebook.com/pages/Datorama/232963956806382>*

Re: Wrong alias name in Window function

Posted by Andries Engelbrecht <ae...@mapr.com>.
I see a similar error in OSX Sierra when using CTTAS. Haven’t looked at Drill on Sierra yet, or the /tmp for that matter on OSX for a while, but I noticed is a link to /private/tmp now. Perhaps someone who has tested CTTAS on Sierra can give some insight, don’t have time to look into it.

--Andries

On 3/31/17, 2:16 AM, "Arina Yelchiyeva" <ar...@gmail.com> wrote:

    Hi Amir,
    
    I am not Mac user, so I can't exactly tell you what the problem is. Maybe
    other Mac users will recognize this error.
    Generally it seems Drill can't create table in dfs.tmp schema. By default
    dfs.tmp points to /tmp directory.
    Maybe you don't have write access in this directory. Directory for dfs.tmp
    can be changed on Web UI in Storage Plugin tab.
    
    Kind regards
    Arina
    
    
    On Thu, Mar 30, 2017 at 11:42 PM, Amir Kafri <am...@datorama.com> wrote:
    
    > Thank you Arina.
    >
    > I tried your query, and the create query statement fails with the following
    > stack (on a fresh 1.10 installation, mac), any ideas?
    > Regarding my issue, I'm working on re-creating it.
    >
    >             SYSTEM ERROR: URISyntaxException: Relative path in
    > absolute URI: wifi-03-30-2017__00:03:49.log
    >
    >
    >
    >   (org.apache.drill.exec.work.foreman.ForemanException) Unexpected
    > exception during fragment initialization: Failure while trying to
    > check if a table or view with given name [t] already exists in schema
    > [dfs.tmp]: java.net.URISyntaxException: Relative path in absolute URI:
    > wifi-03-30-2017__00:03:49.log
    >     org.apache.drill.exec.work.foreman.Foreman.run():298
    >     java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    >     java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    >     java.lang.Thread.run():745
    >   Caused By (org.apache.drill.common.exceptions.DrillRuntimeException)
    > Failure while trying to check if a table or view with given name [t]
    > already exists in schema [dfs.tmp]: java.net.URISyntaxException:
    > Relative path in absolute URI: wifi-03-30-2017__00:03:49.log
    >     org.apache.drill.exec.planner.sql.handlers.SqlHandlerUtil.ge
    > tTableFromSchema():215
    >     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
    > r.checkDuplicatedObjectExistence():307
    >     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
    > r.getPlan():86
    >     org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
    >     org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
    >     org.apache.drill.exec.work.foreman.Foreman.runSQL():1050
    >     org.apache.drill.exec.work.foreman.Foreman.run():281
    >     java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    >     java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    >     java.lang.Thread.run():745
    >   Caused By (java.lang.IllegalArgumentException)
    > java.net.URISyntaxException: Relative path in absolute URI:
    > wifi-03-30-2017__00:03:49.log
    >     org.apache.hadoop.fs.Path.initialize():205
    >     org.apache.hadoop.fs.Path.():171
    >     org.apache.hadoop.fs.Path.():93
    >     org.apache.hadoop.fs.Globber.glob():241
    >     org.apache.hadoop.fs.FileSystem.globStatus():1655
    >     org.apache.drill.exec.store.dfs.DrillFileSystem.globStatus():548
    >     org.apache.drill.exec.dotdrill.DotDrillUtil.getDotDrills():61
    >     org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$Works
    > paceSchema.getTable():493
    >     org.apache.drill.exec.planner.sql.handlers.SqlHandlerUtil.ge
    > tTableFromSchema():212
    >     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
    > r.checkDuplicatedObjectExistence():307
    >     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
    > r.getPlan():86
    >     org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
    >     org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
    >     org.apache.drill.exec.work.foreman.Foreman.runSQL():1050
    >     org.apache.drill.exec.work.foreman.Foreman.run():281
    >     java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    >     java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    >     java.lang.Thread.run():745
    >   Caused By (java.net.URISyntaxException) Relative path in absolute
    > URI: wifi-03-30-2017__00:03:49.log
    >     java.net.URI.checkPath():1823
    >     java.net.URI.():745
    >     org.apache.hadoop.fs.Path.initialize():202
    >     org.apache.hadoop.fs.Path.():171
    >     org.apache.hadoop.fs.Path.():93
    >     org.apache.hadoop.fs.Globber.glob():241
    >     org.apache.hadoop.fs.FileSystem.globStatus():1655
    >     org.apache.drill.exec.store.dfs.DrillFileSystem.globStatus():548
    >     org.apache.drill.exec.dotdrill.DotDrillUtil.getDotDrills():61
    >     org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$Works
    > paceSchema.getTable():493
    >     org.apache.drill.exec.planner.sql.handlers.SqlHandlerUtil.ge
    > tTableFromSchema():212
    >     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
    > r.checkDuplicatedObjectExistence():307
    >     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
    > r.getPlan():86
    >     org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
    >     org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
    >     org.apache.drill.exec.work.foreman.Foreman.runSQL():1050
    >     org.apache.drill.exec.work.foreman.Foreman.run():281
    >     java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    >     java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    >     java.lang.Thread.run():745
    >
    >  Thank you,
    > Amir Kafri
    >
    > On Tue, Mar 28, 2017 at 4:12 PM Arina Yelchiyeva <
    > arina.yelchiyeva@gmail.com>
    > wrote:
    >
    > > I have tried simple query on Drill 1.9.0 but seems query returns correct
    > > result.
    > >
    > > create table dfs.tmp.t as select 1 col1, 2 col2 from (values(1));
    > > select col1 c, sum(col1) over() cnt from dfs.tmp.t where col2 between 1
    > and
    > > 10;
    > > +----+------+
    > > | c  | cnt  |
    > > +----+------+
    > > | 1  | 1    |
    > > +----+------+
    > >
    > > Amir, it would be great if you could provide sample data and instructions
    > > how to reproduce the issue (like I did above) and open Jira with this
    > > information.
    > >
    > > Kind regards
    > > Arina
    > >
    > > On Tue, Mar 28, 2017 at 1:23 PM, Amir Kafri <am...@datorama.com> wrote:
    > >
    > > > Hi Arina,
    > > >
    > > > I'm using V 1.9. I tried it both in embedded and jdbc.
    > > >
    > > > The actual query is slightly more complicated:
    > > >
    > > > SELECT
    > > >         bugs DYNAMIC_SCHEMA_2_MES_BUGS,
    > > >         sum(bugs) over() AS CNT
    > > >     FROM
    > > >         s3datorama.`dss`.`dynamic-schema-id=2` DYNAMIC_SCHEMA_2
    > > >     WHERE
    > > >         ( DYNAMIC_SCHEMA_2.date_id >= 2015021100 <(201)%20502-1100>
    > AND
    > > > DYNAMIC_SCHEMA_2.date_id <= 2017031223 <(201)%20703-1223> )
    > > >
    > > > On Tue, Mar 28, 2017 at 12:40 PM Arina Yelchiyeva <
    > > > arina.yelchiyeva@gmail.com> wrote:
    > > >
    > > > > Hi Amir,
    > > > >
    > > > > Which version of Drill are you using?
    > > > > I have tried to reproduce the issue in embedded mode and in also
    > using
    > > > jdbc
    > > > > but no luck.
    > > > >
    > > > > Kind regards
    > > > > Arina
    > > > >
    > > > > On Tue, Mar 28, 2017 at 10:25 AM, Amir Kafri <am...@datorama.com>
    > > wrote:
    > > > >
    > > > > > Hi All,
    > > > > >
    > > > > > I think I've encountered a bug:
    > > > > >
    > > > > > I'm running the following query:
    > > > > >
    > > > > > SELECT
    > > > > >    metric AS m,
    > > > > >    COUNT(*) OVER() AS row_counter
    > > > > > FROM t
    > > > > >
    > > > > > The result is correct, but the name of the 2nd column in the result
    > > set
    > > > > is
    > > > > > w0$o0.
    > > > > >
    > > > > > If I switch the order in the SELECT:
    > > > > > SELECT
    > > > > >    COUNT(*) OVER() AS row_counter,
    > > > > >     metric AS m
    > > > > > FROM t
    > > > > >
    > > > > > then the column names are correct (row_counter, m).
    > > > > >
    > > > > >
    > > > > > --
    > > > > >
    > > > > > *Amir Kafri*Data Engineer
    > > > > >
    > > > > >
    > > > > > *datorama*All Your *Data*, Working Together
    > > > > > *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
    > > > > > *E* amirk@datorama.com
    > > > > > *Website <http://www.datorama.com/> | LinkedIn
    > > > > > <https://www.linkedin.com/company/datorama> | Twitter
    > > > > > <https://twitter.com/datorama> | Facebook
    > > > > > <https://www.facebook.com/pages/Datorama/232963956806382>*
    > > > > >
    > > > >
    > > > --
    > > >
    > > > *Amir Kafri*Data Engineer
    > > >
    > > >
    > > > *datorama*All Your *Data*, Working Together
    > > > *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
    > > > *E* amirk@datorama.com
    > > > *Website <http://www.datorama.com/> | LinkedIn
    > > > <https://www.linkedin.com/company/datorama> | Twitter
    > > > <https://twitter.com/datorama> | Facebook
    > > > <https://www.facebook.com/pages/Datorama/232963956806382>*
    > > >
    > >
    > --
    >
    > *Amir Kafri*Data Engineer
    >
    >
    > *datorama*All Your *Data*, Working Together
    > *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
    > *E* amirk@datorama.com
    > *Website <http://www.datorama.com/> | LinkedIn
    > <https://www.linkedin.com/company/datorama> | Twitter
    > <https://twitter.com/datorama> | Facebook
    > <https://www.facebook.com/pages/Datorama/232963956806382>*
    >
    


Re: Wrong alias name in Window function

Posted by Arina Yelchiyeva <ar...@gmail.com>.
Hi Amir,

I am not Mac user, so I can't exactly tell you what the problem is. Maybe
other Mac users will recognize this error.
Generally it seems Drill can't create table in dfs.tmp schema. By default
dfs.tmp points to /tmp directory.
Maybe you don't have write access in this directory. Directory for dfs.tmp
can be changed on Web UI in Storage Plugin tab.

Kind regards
Arina


On Thu, Mar 30, 2017 at 11:42 PM, Amir Kafri <am...@datorama.com> wrote:

> Thank you Arina.
>
> I tried your query, and the create query statement fails with the following
> stack (on a fresh 1.10 installation, mac), any ideas?
> Regarding my issue, I'm working on re-creating it.
>
>             SYSTEM ERROR: URISyntaxException: Relative path in
> absolute URI: wifi-03-30-2017__00:03:49.log
>
>
>
>   (org.apache.drill.exec.work.foreman.ForemanException) Unexpected
> exception during fragment initialization: Failure while trying to
> check if a table or view with given name [t] already exists in schema
> [dfs.tmp]: java.net.URISyntaxException: Relative path in absolute URI:
> wifi-03-30-2017__00:03:49.log
>     org.apache.drill.exec.work.foreman.Foreman.run():298
>     java.util.concurrent.ThreadPoolExecutor.runWorker():1142
>     java.util.concurrent.ThreadPoolExecutor$Worker.run():617
>     java.lang.Thread.run():745
>   Caused By (org.apache.drill.common.exceptions.DrillRuntimeException)
> Failure while trying to check if a table or view with given name [t]
> already exists in schema [dfs.tmp]: java.net.URISyntaxException:
> Relative path in absolute URI: wifi-03-30-2017__00:03:49.log
>     org.apache.drill.exec.planner.sql.handlers.SqlHandlerUtil.ge
> tTableFromSchema():215
>     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
> r.checkDuplicatedObjectExistence():307
>     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
> r.getPlan():86
>     org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
>     org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
>     org.apache.drill.exec.work.foreman.Foreman.runSQL():1050
>     org.apache.drill.exec.work.foreman.Foreman.run():281
>     java.util.concurrent.ThreadPoolExecutor.runWorker():1142
>     java.util.concurrent.ThreadPoolExecutor$Worker.run():617
>     java.lang.Thread.run():745
>   Caused By (java.lang.IllegalArgumentException)
> java.net.URISyntaxException: Relative path in absolute URI:
> wifi-03-30-2017__00:03:49.log
>     org.apache.hadoop.fs.Path.initialize():205
>     org.apache.hadoop.fs.Path.():171
>     org.apache.hadoop.fs.Path.():93
>     org.apache.hadoop.fs.Globber.glob():241
>     org.apache.hadoop.fs.FileSystem.globStatus():1655
>     org.apache.drill.exec.store.dfs.DrillFileSystem.globStatus():548
>     org.apache.drill.exec.dotdrill.DotDrillUtil.getDotDrills():61
>     org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$Works
> paceSchema.getTable():493
>     org.apache.drill.exec.planner.sql.handlers.SqlHandlerUtil.ge
> tTableFromSchema():212
>     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
> r.checkDuplicatedObjectExistence():307
>     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
> r.getPlan():86
>     org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
>     org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
>     org.apache.drill.exec.work.foreman.Foreman.runSQL():1050
>     org.apache.drill.exec.work.foreman.Foreman.run():281
>     java.util.concurrent.ThreadPoolExecutor.runWorker():1142
>     java.util.concurrent.ThreadPoolExecutor$Worker.run():617
>     java.lang.Thread.run():745
>   Caused By (java.net.URISyntaxException) Relative path in absolute
> URI: wifi-03-30-2017__00:03:49.log
>     java.net.URI.checkPath():1823
>     java.net.URI.():745
>     org.apache.hadoop.fs.Path.initialize():202
>     org.apache.hadoop.fs.Path.():171
>     org.apache.hadoop.fs.Path.():93
>     org.apache.hadoop.fs.Globber.glob():241
>     org.apache.hadoop.fs.FileSystem.globStatus():1655
>     org.apache.drill.exec.store.dfs.DrillFileSystem.globStatus():548
>     org.apache.drill.exec.dotdrill.DotDrillUtil.getDotDrills():61
>     org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$Works
> paceSchema.getTable():493
>     org.apache.drill.exec.planner.sql.handlers.SqlHandlerUtil.ge
> tTableFromSchema():212
>     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
> r.checkDuplicatedObjectExistence():307
>     org.apache.drill.exec.planner.sql.handlers.CreateTableHandle
> r.getPlan():86
>     org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
>     org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
>     org.apache.drill.exec.work.foreman.Foreman.runSQL():1050
>     org.apache.drill.exec.work.foreman.Foreman.run():281
>     java.util.concurrent.ThreadPoolExecutor.runWorker():1142
>     java.util.concurrent.ThreadPoolExecutor$Worker.run():617
>     java.lang.Thread.run():745
>
>  Thank you,
> Amir Kafri
>
> On Tue, Mar 28, 2017 at 4:12 PM Arina Yelchiyeva <
> arina.yelchiyeva@gmail.com>
> wrote:
>
> > I have tried simple query on Drill 1.9.0 but seems query returns correct
> > result.
> >
> > create table dfs.tmp.t as select 1 col1, 2 col2 from (values(1));
> > select col1 c, sum(col1) over() cnt from dfs.tmp.t where col2 between 1
> and
> > 10;
> > +----+------+
> > | c  | cnt  |
> > +----+------+
> > | 1  | 1    |
> > +----+------+
> >
> > Amir, it would be great if you could provide sample data and instructions
> > how to reproduce the issue (like I did above) and open Jira with this
> > information.
> >
> > Kind regards
> > Arina
> >
> > On Tue, Mar 28, 2017 at 1:23 PM, Amir Kafri <am...@datorama.com> wrote:
> >
> > > Hi Arina,
> > >
> > > I'm using V 1.9. I tried it both in embedded and jdbc.
> > >
> > > The actual query is slightly more complicated:
> > >
> > > SELECT
> > >         bugs DYNAMIC_SCHEMA_2_MES_BUGS,
> > >         sum(bugs) over() AS CNT
> > >     FROM
> > >         s3datorama.`dss`.`dynamic-schema-id=2` DYNAMIC_SCHEMA_2
> > >     WHERE
> > >         ( DYNAMIC_SCHEMA_2.date_id >= 2015021100 <(201)%20502-1100>
> AND
> > > DYNAMIC_SCHEMA_2.date_id <= 2017031223 <(201)%20703-1223> )
> > >
> > > On Tue, Mar 28, 2017 at 12:40 PM Arina Yelchiyeva <
> > > arina.yelchiyeva@gmail.com> wrote:
> > >
> > > > Hi Amir,
> > > >
> > > > Which version of Drill are you using?
> > > > I have tried to reproduce the issue in embedded mode and in also
> using
> > > jdbc
> > > > but no luck.
> > > >
> > > > Kind regards
> > > > Arina
> > > >
> > > > On Tue, Mar 28, 2017 at 10:25 AM, Amir Kafri <am...@datorama.com>
> > wrote:
> > > >
> > > > > Hi All,
> > > > >
> > > > > I think I've encountered a bug:
> > > > >
> > > > > I'm running the following query:
> > > > >
> > > > > SELECT
> > > > >    metric AS m,
> > > > >    COUNT(*) OVER() AS row_counter
> > > > > FROM t
> > > > >
> > > > > The result is correct, but the name of the 2nd column in the result
> > set
> > > > is
> > > > > w0$o0.
> > > > >
> > > > > If I switch the order in the SELECT:
> > > > > SELECT
> > > > >    COUNT(*) OVER() AS row_counter,
> > > > >     metric AS m
> > > > > FROM t
> > > > >
> > > > > then the column names are correct (row_counter, m).
> > > > >
> > > > >
> > > > > --
> > > > >
> > > > > *Amir Kafri*Data Engineer
> > > > >
> > > > >
> > > > > *datorama*All Your *Data*, Working Together
> > > > > *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
> > > > > *E* amirk@datorama.com
> > > > > *Website <http://www.datorama.com/> | LinkedIn
> > > > > <https://www.linkedin.com/company/datorama> | Twitter
> > > > > <https://twitter.com/datorama> | Facebook
> > > > > <https://www.facebook.com/pages/Datorama/232963956806382>*
> > > > >
> > > >
> > > --
> > >
> > > *Amir Kafri*Data Engineer
> > >
> > >
> > > *datorama*All Your *Data*, Working Together
> > > *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
> > > *E* amirk@datorama.com
> > > *Website <http://www.datorama.com/> | LinkedIn
> > > <https://www.linkedin.com/company/datorama> | Twitter
> > > <https://twitter.com/datorama> | Facebook
> > > <https://www.facebook.com/pages/Datorama/232963956806382>*
> > >
> >
> --
>
> *Amir Kafri*Data Engineer
>
>
> *datorama*All Your *Data*, Working Together
> *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
> *E* amirk@datorama.com
> *Website <http://www.datorama.com/> | LinkedIn
> <https://www.linkedin.com/company/datorama> | Twitter
> <https://twitter.com/datorama> | Facebook
> <https://www.facebook.com/pages/Datorama/232963956806382>*
>

Re: Wrong alias name in Window function

Posted by Amir Kafri <am...@datorama.com>.
Thank you Arina.

I tried your query, and the create query statement fails with the following
stack (on a fresh 1.10 installation, mac), any ideas?
Regarding my issue, I'm working on re-creating it.

            SYSTEM ERROR: URISyntaxException: Relative path in
absolute URI: wifi-03-30-2017__00:03:49.log



  (org.apache.drill.exec.work.foreman.ForemanException) Unexpected
exception during fragment initialization: Failure while trying to
check if a table or view with given name [t] already exists in schema
[dfs.tmp]: java.net.URISyntaxException: Relative path in absolute URI:
wifi-03-30-2017__00:03:49.log
    org.apache.drill.exec.work.foreman.Foreman.run():298
    java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    java.lang.Thread.run():745
  Caused By (org.apache.drill.common.exceptions.DrillRuntimeException)
Failure while trying to check if a table or view with given name [t]
already exists in schema [dfs.tmp]: java.net.URISyntaxException:
Relative path in absolute URI: wifi-03-30-2017__00:03:49.log
    org.apache.drill.exec.planner.sql.handlers.SqlHandlerUtil.getTableFromSchema():215
    org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.checkDuplicatedObjectExistence():307
    org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.getPlan():86
    org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
    org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
    org.apache.drill.exec.work.foreman.Foreman.runSQL():1050
    org.apache.drill.exec.work.foreman.Foreman.run():281
    java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    java.lang.Thread.run():745
  Caused By (java.lang.IllegalArgumentException)
java.net.URISyntaxException: Relative path in absolute URI:
wifi-03-30-2017__00:03:49.log
    org.apache.hadoop.fs.Path.initialize():205
    org.apache.hadoop.fs.Path.():171
    org.apache.hadoop.fs.Path.():93
    org.apache.hadoop.fs.Globber.glob():241
    org.apache.hadoop.fs.FileSystem.globStatus():1655
    org.apache.drill.exec.store.dfs.DrillFileSystem.globStatus():548
    org.apache.drill.exec.dotdrill.DotDrillUtil.getDotDrills():61
    org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.getTable():493
    org.apache.drill.exec.planner.sql.handlers.SqlHandlerUtil.getTableFromSchema():212
    org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.checkDuplicatedObjectExistence():307
    org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.getPlan():86
    org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
    org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
    org.apache.drill.exec.work.foreman.Foreman.runSQL():1050
    org.apache.drill.exec.work.foreman.Foreman.run():281
    java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    java.lang.Thread.run():745
  Caused By (java.net.URISyntaxException) Relative path in absolute
URI: wifi-03-30-2017__00:03:49.log
    java.net.URI.checkPath():1823
    java.net.URI.():745
    org.apache.hadoop.fs.Path.initialize():202
    org.apache.hadoop.fs.Path.():171
    org.apache.hadoop.fs.Path.():93
    org.apache.hadoop.fs.Globber.glob():241
    org.apache.hadoop.fs.FileSystem.globStatus():1655
    org.apache.drill.exec.store.dfs.DrillFileSystem.globStatus():548
    org.apache.drill.exec.dotdrill.DotDrillUtil.getDotDrills():61
    org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory$WorkspaceSchema.getTable():493
    org.apache.drill.exec.planner.sql.handlers.SqlHandlerUtil.getTableFromSchema():212
    org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.checkDuplicatedObjectExistence():307
    org.apache.drill.exec.planner.sql.handlers.CreateTableHandler.getPlan():86
    org.apache.drill.exec.planner.sql.DrillSqlWorker.getQueryPlan():131
    org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan():79
    org.apache.drill.exec.work.foreman.Foreman.runSQL():1050
    org.apache.drill.exec.work.foreman.Foreman.run():281
    java.util.concurrent.ThreadPoolExecutor.runWorker():1142
    java.util.concurrent.ThreadPoolExecutor$Worker.run():617
    java.lang.Thread.run():745

 Thank you,
Amir Kafri

On Tue, Mar 28, 2017 at 4:12 PM Arina Yelchiyeva <ar...@gmail.com>
wrote:

> I have tried simple query on Drill 1.9.0 but seems query returns correct
> result.
>
> create table dfs.tmp.t as select 1 col1, 2 col2 from (values(1));
> select col1 c, sum(col1) over() cnt from dfs.tmp.t where col2 between 1 and
> 10;
> +----+------+
> | c  | cnt  |
> +----+------+
> | 1  | 1    |
> +----+------+
>
> Amir, it would be great if you could provide sample data and instructions
> how to reproduce the issue (like I did above) and open Jira with this
> information.
>
> Kind regards
> Arina
>
> On Tue, Mar 28, 2017 at 1:23 PM, Amir Kafri <am...@datorama.com> wrote:
>
> > Hi Arina,
> >
> > I'm using V 1.9. I tried it both in embedded and jdbc.
> >
> > The actual query is slightly more complicated:
> >
> > SELECT
> >         bugs DYNAMIC_SCHEMA_2_MES_BUGS,
> >         sum(bugs) over() AS CNT
> >     FROM
> >         s3datorama.`dss`.`dynamic-schema-id=2` DYNAMIC_SCHEMA_2
> >     WHERE
> >         ( DYNAMIC_SCHEMA_2.date_id >= 2015021100 <(201)%20502-1100> AND
> > DYNAMIC_SCHEMA_2.date_id <= 2017031223 <(201)%20703-1223> )
> >
> > On Tue, Mar 28, 2017 at 12:40 PM Arina Yelchiyeva <
> > arina.yelchiyeva@gmail.com> wrote:
> >
> > > Hi Amir,
> > >
> > > Which version of Drill are you using?
> > > I have tried to reproduce the issue in embedded mode and in also using
> > jdbc
> > > but no luck.
> > >
> > > Kind regards
> > > Arina
> > >
> > > On Tue, Mar 28, 2017 at 10:25 AM, Amir Kafri <am...@datorama.com>
> wrote:
> > >
> > > > Hi All,
> > > >
> > > > I think I've encountered a bug:
> > > >
> > > > I'm running the following query:
> > > >
> > > > SELECT
> > > >    metric AS m,
> > > >    COUNT(*) OVER() AS row_counter
> > > > FROM t
> > > >
> > > > The result is correct, but the name of the 2nd column in the result
> set
> > > is
> > > > w0$o0.
> > > >
> > > > If I switch the order in the SELECT:
> > > > SELECT
> > > >    COUNT(*) OVER() AS row_counter,
> > > >     metric AS m
> > > > FROM t
> > > >
> > > > then the column names are correct (row_counter, m).
> > > >
> > > >
> > > > --
> > > >
> > > > *Amir Kafri*Data Engineer
> > > >
> > > >
> > > > *datorama*All Your *Data*, Working Together
> > > > *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
> > > > *E* amirk@datorama.com
> > > > *Website <http://www.datorama.com/> | LinkedIn
> > > > <https://www.linkedin.com/company/datorama> | Twitter
> > > > <https://twitter.com/datorama> | Facebook
> > > > <https://www.facebook.com/pages/Datorama/232963956806382>*
> > > >
> > >
> > --
> >
> > *Amir Kafri*Data Engineer
> >
> >
> > *datorama*All Your *Data*, Working Together
> > *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
> > *E* amirk@datorama.com
> > *Website <http://www.datorama.com/> | LinkedIn
> > <https://www.linkedin.com/company/datorama> | Twitter
> > <https://twitter.com/datorama> | Facebook
> > <https://www.facebook.com/pages/Datorama/232963956806382>*
> >
>
-- 

*Amir Kafri*Data Engineer


*datorama*All Your *Data*, Working Together
*.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
*E* amirk@datorama.com
*Website <http://www.datorama.com/> | LinkedIn
<https://www.linkedin.com/company/datorama> | Twitter
<https://twitter.com/datorama> | Facebook
<https://www.facebook.com/pages/Datorama/232963956806382>*

Re: Wrong alias name in Window function

Posted by Arina Yelchiyeva <ar...@gmail.com>.
I have tried simple query on Drill 1.9.0 but seems query returns correct
result.

create table dfs.tmp.t as select 1 col1, 2 col2 from (values(1));
select col1 c, sum(col1) over() cnt from dfs.tmp.t where col2 between 1 and
10;
+----+------+
| c  | cnt  |
+----+------+
| 1  | 1    |
+----+------+

Amir, it would be great if you could provide sample data and instructions
how to reproduce the issue (like I did above) and open Jira with this
information.

Kind regards
Arina

On Tue, Mar 28, 2017 at 1:23 PM, Amir Kafri <am...@datorama.com> wrote:

> Hi Arina,
>
> I'm using V 1.9. I tried it both in embedded and jdbc.
>
> The actual query is slightly more complicated:
>
> SELECT
>         bugs DYNAMIC_SCHEMA_2_MES_BUGS,
>         sum(bugs) over() AS CNT
>     FROM
>         s3datorama.`dss`.`dynamic-schema-id=2` DYNAMIC_SCHEMA_2
>     WHERE
>         ( DYNAMIC_SCHEMA_2.date_id >= 2015021100 AND
> DYNAMIC_SCHEMA_2.date_id <= 2017031223 )
>
> On Tue, Mar 28, 2017 at 12:40 PM Arina Yelchiyeva <
> arina.yelchiyeva@gmail.com> wrote:
>
> > Hi Amir,
> >
> > Which version of Drill are you using?
> > I have tried to reproduce the issue in embedded mode and in also using
> jdbc
> > but no luck.
> >
> > Kind regards
> > Arina
> >
> > On Tue, Mar 28, 2017 at 10:25 AM, Amir Kafri <am...@datorama.com> wrote:
> >
> > > Hi All,
> > >
> > > I think I've encountered a bug:
> > >
> > > I'm running the following query:
> > >
> > > SELECT
> > >    metric AS m,
> > >    COUNT(*) OVER() AS row_counter
> > > FROM t
> > >
> > > The result is correct, but the name of the 2nd column in the result set
> > is
> > > w0$o0.
> > >
> > > If I switch the order in the SELECT:
> > > SELECT
> > >    COUNT(*) OVER() AS row_counter,
> > >     metric AS m
> > > FROM t
> > >
> > > then the column names are correct (row_counter, m).
> > >
> > >
> > > --
> > >
> > > *Amir Kafri*Data Engineer
> > >
> > >
> > > *datorama*All Your *Data*, Working Together
> > > *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
> > > *E* amirk@datorama.com
> > > *Website <http://www.datorama.com/> | LinkedIn
> > > <https://www.linkedin.com/company/datorama> | Twitter
> > > <https://twitter.com/datorama> | Facebook
> > > <https://www.facebook.com/pages/Datorama/232963956806382>*
> > >
> >
> --
>
> *Amir Kafri*Data Engineer
>
>
> *datorama*All Your *Data*, Working Together
> *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
> *E* amirk@datorama.com
> *Website <http://www.datorama.com/> | LinkedIn
> <https://www.linkedin.com/company/datorama> | Twitter
> <https://twitter.com/datorama> | Facebook
> <https://www.facebook.com/pages/Datorama/232963956806382>*
>

Re: Wrong alias name in Window function

Posted by Amir Kafri <am...@datorama.com>.
Hi Arina,

I'm using V 1.9. I tried it both in embedded and jdbc.

The actual query is slightly more complicated:

SELECT
        bugs DYNAMIC_SCHEMA_2_MES_BUGS,
        sum(bugs) over() AS CNT
    FROM
        s3datorama.`dss`.`dynamic-schema-id=2` DYNAMIC_SCHEMA_2
    WHERE
        ( DYNAMIC_SCHEMA_2.date_id >= 2015021100 AND
DYNAMIC_SCHEMA_2.date_id <= 2017031223 )

On Tue, Mar 28, 2017 at 12:40 PM Arina Yelchiyeva <
arina.yelchiyeva@gmail.com> wrote:

> Hi Amir,
>
> Which version of Drill are you using?
> I have tried to reproduce the issue in embedded mode and in also using jdbc
> but no luck.
>
> Kind regards
> Arina
>
> On Tue, Mar 28, 2017 at 10:25 AM, Amir Kafri <am...@datorama.com> wrote:
>
> > Hi All,
> >
> > I think I've encountered a bug:
> >
> > I'm running the following query:
> >
> > SELECT
> >    metric AS m,
> >    COUNT(*) OVER() AS row_counter
> > FROM t
> >
> > The result is correct, but the name of the 2nd column in the result set
> is
> > w0$o0.
> >
> > If I switch the order in the SELECT:
> > SELECT
> >    COUNT(*) OVER() AS row_counter,
> >     metric AS m
> > FROM t
> >
> > then the column names are correct (row_counter, m).
> >
> >
> > --
> >
> > *Amir Kafri*Data Engineer
> >
> >
> > *datorama*All Your *Data*, Working Together
> > *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
> > *E* amirk@datorama.com
> > *Website <http://www.datorama.com/> | LinkedIn
> > <https://www.linkedin.com/company/datorama> | Twitter
> > <https://twitter.com/datorama> | Facebook
> > <https://www.facebook.com/pages/Datorama/232963956806382>*
> >
>
-- 

*Amir Kafri*Data Engineer


*datorama*All Your *Data*, Working Together
*.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
*E* amirk@datorama.com
*Website <http://www.datorama.com/> | LinkedIn
<https://www.linkedin.com/company/datorama> | Twitter
<https://twitter.com/datorama> | Facebook
<https://www.facebook.com/pages/Datorama/232963956806382>*

Re: Wrong alias name in Window function

Posted by Arina Yelchiyeva <ar...@gmail.com>.
Hi Amir,

Which version of Drill are you using?
I have tried to reproduce the issue in embedded mode and in also using jdbc
but no luck.

Kind regards
Arina

On Tue, Mar 28, 2017 at 10:25 AM, Amir Kafri <am...@datorama.com> wrote:

> Hi All,
>
> I think I've encountered a bug:
>
> I'm running the following query:
>
> SELECT
>    metric AS m,
>    COUNT(*) OVER() AS row_counter
> FROM t
>
> The result is correct, but the name of the 2nd column in the result set is
> w0$o0.
>
> If I switch the order in the SELECT:
> SELECT
>    COUNT(*) OVER() AS row_counter,
>     metric AS m
> FROM t
>
> then the column names are correct (row_counter, m).
>
>
> --
>
> *Amir Kafri*Data Engineer
>
>
> *datorama*All Your *Data*, Working Together
> *.*Habarzel 34, Ramat Hachayal, Tel-Aviv, 69710
> *E* amirk@datorama.com
> *Website <http://www.datorama.com/> | LinkedIn
> <https://www.linkedin.com/company/datorama> | Twitter
> <https://twitter.com/datorama> | Facebook
> <https://www.facebook.com/pages/Datorama/232963956806382>*
>