Issue 1:
I'm working on a simple line chart which has 1 time-based column and 1 fact/metric. I've attached a screen capture of the chart dialog screen. I have 1 time column (meal_date), 1 metric sum(calories), 1 group by expression (meal_date), and 1 sort by expression (1) defined on the data tab.

This should yield a sql query like this:

select meal_date AS meal_date,

sum(calories) AS "Calories"

from public.factfood

group by meal_date

order by 1;

Very simple, very straightforward. Even the line chart itself looks ok. However there's no data displayed on the line chart. Additionally, there is an extra column called _timestamp and the result set is not sorted at all. Upon viewing the sql created, there's a lot of extra code that I would not expect to be there. Here is the sql query code created for this line chart:

SELECT meal_date AS timestamp, <-- Extra/Duplicate Column, not referenced in the dialog screen

meal_date AS meal_date,

sum(calories) AS "Calories"

FROM public.factfood

JOIN <-- Completely unneccessary, this is a 1 table only query, so no joins needed

(SELECT meal_date AS meal_date,

sum(calories) AS mme_inner__

FROM public.factfood

GROUP BY meal_date

ORDER BY 1 DESC **<-- Order by in the wrong place, it needs to be below the last group by **

LIMIT 100) AS anon_1 ON meal_date = meal_date__

GROUP BY meal_date,

meal_date

LIMIT 10000;

Environment

Centos 8 o/s

Postgres 13 DB

superset version: 1.2

python version: 3.8

node.js version: none

How do I fix these 3 errors?

I need to not have the _timestamp column but I don't see where it comes from. There's no option to not have a Time column.

I need to have the order by clause utilized by the correct select stmt. Getting rid of the unnecessary join/select stmts would help.

I need to see the datapoints on the chart. This is probably because of that extra _timetamp column, not sure.

Issue 2:
Make sure these boxes are checked before submitting your issue - thank you!

[x ] I have checked the superset logs for python stacktraces and included it here as text if there are any.

[x ] I have reproduced the issue with at least the latest released version of superset.

I have checked the issue tracker for the same issue and I haven't found one similar.

Superset version

latest git

Expected results

superset starts up without error

Actual results

superset_1 | npm ERR! path /home/superset/superset/assets/node_modules

superset_1 | npm ERR! code EACCES

superset_1 | npm ERR! errno -13

superset_1 | npm ERR! syscall mkdir

superset_1 | npm ERR! Error: EACCES: permission denied, mkdir '/home/superset/superset/assets/node_modules'

superset_1 | npm ERR! { [Error: EACCES: permission denied, mkdir '/home/superset/superset/assets/node_modules']

superset_1 | npm ERR! cause:

superset_1 | npm ERR! { Error: EACCES: permission denied, mkdir '/home/superset/superset/assets/node_modules'

superset_1 | npm ERR! type: 'OperationalError',

superset_1 | npm ERR! '$error': '$error',

superset_1 | npm ERR! cause:

superset_1 | npm ERR! { errno: -13,

superset_1 | npm ERR! code: 'EACCES',

superset_1 | npm ERR! syscall: 'mkdir',

superset_1 | npm ERR! path: '/home/superset/superset/assets/node_modules' },

superset_1 | npm ERR! isOperational: true,

superset_1 | npm ERR! errno: -13,

superset_1 | npm ERR! code: 'EACCES',

superset_1 | npm ERR! syscall: 'mkdir',

superset_1 | npm ERR! path: '/home/superset/superset/assets/node_modules' },

superset_1 | npm ERR! isOperational: true,

superset_1 | npm ERR! stack:

superset_1 | npm ERR! 'Error: EACCES: permission denied, mkdir '/home/superset/superset/assets/node_modules'',

superset_1 | npm ERR! type: 'OperationalError',

superset_1 | npm ERR! '$error': '$error',

superset_1 | npm ERR! errno: -13,

superset_1 | npm ERR! code: 'EACCES',

superset_1 | npm ERR! syscall: 'mkdir',

superset_1 | npm ERR! path: '/home/superset/superset/assets/node_modules' }

superset_1 | npm ERR!

superset_1 | npm ERR! The operation was rejected by your operating system.

superset_1 | npm ERR! It is likely you do not have the permissions to access this file as the current user

superset_1 | npm ERR!

superset_1 | npm ERR! If you believe this might be a permissions issue, please double-check the

superset_1 | npm ERR! permissions of the file and its containing directories, or try running

superset_1 | npm ERR! the command again as root/Administrator (though this is not recommended).

superset_1 |

superset_1 | npm ERR! A complete log of this run can be found in:

superset_1 | npm ERR! /home/superset/.npm/_logs/2019-02-15T09_24_16_955Z-debug.log

superset_superset_1 exited with code 243

Steps to reproduce

git clone https://github.com/apache/incubator-superset/

cd incubator-superset/contrib/docker

prefix with SUPERSET_LOAD_EXAMPLES=yes to load examples:

docker-compose run --rm superset ./docker-init.sh

you can run this command everytime you need to start superset now:

docker-compose up

EDIT:

additional infos:

CentOS Linux release 7.6.1810 (Core)

docker version:

Docker version 18.09.2, build 6247962