[incubator-superset] branch master updated: fix: update community Slack link (#10360)

2020-07-17 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 1a41ea4  fix: update community Slack link (#10360)
1a41ea4 is described below

commit 1a41ea49880520d296a7cb58f2d8ebccfbd5681a
Author: kxu 
AuthorDate: Fri Jul 17 14:10:50 2020 -0700

fix: update community Slack link (#10360)
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 3ad6c91..9741174 100644
--- a/README.md
+++ b/README.md
@@ -105,7 +105,7 @@ supported databases can be found
 ## Get Involved
 
 * Ask and answer questions on 
[StackOverflow](https://stackoverflow.com/questions/tagged/apache-superset)
-* [Join our community's 
Slack](https://join.slack.com/t/apache-superset/shared_invite/enQtNDMxMDY5NjM4MDU0LWJmOTcxYjlhZTRhYmEyYTMzOWYxOWEwMjcwZDZiNWRiNDY2NDUwNzcwMDFhNzE1ZmMxZTZlZWY0ZTQ2MzMyNTU)
+* [Join our community's 
Slack](https://join.slack.com/t/apache-superset/shared_invite/zt-g8lpruog-HeqpgYrwdfrD5OYhlU7hPQ)
   and please read our [Slack Community 
Guidelines](CODE_OF_CONDUCT.md#slack-community-guidelines)
 * [Join our d...@superset.apache.org Mailing 
list](https://lists.apache.org/list.html?d...@superset.apache.org)
 



[incubator-superset] branch master updated (5984df3 -> a7a9643)

2020-07-17 Thread johnbodley
This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from 5984df3  chore: enable no-static-element-interactions eslint rule 
(#10351)
 add a7a9643  chore: Silencing unused thumbnail cache config (#10291)

No new revisions were added by this update.

Summary of changes:
 superset/config.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)



[incubator-superset] branch master updated (5984df3 -> a7a9643)

2020-07-17 Thread johnbodley
This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from 5984df3  chore: enable no-static-element-interactions eslint rule 
(#10351)
 add a7a9643  chore: Silencing unused thumbnail cache config (#10291)

No new revisions were added by this update.

Summary of changes:
 superset/config.py | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)



[incubator-superset] branch master updated: chore: enable no-static-element-interactions eslint rule (#10351)

2020-07-17 Thread erikrit
This is an automated email from the ASF dual-hosted git repository.

erikrit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 5984df3  chore: enable no-static-element-interactions eslint rule 
(#10351)
5984df3 is described below

commit 5984df3522e31687567b3018dd2d94fc87ad6b91
Author: Erik Ritter 
AuthorDate: Fri Jul 17 09:19:16 2020 -0700

chore: enable no-static-element-interactions eslint rule (#10351)
---
 superset-frontend/.eslintrc.js|  2 --
 superset-frontend/src/CRUD/CollectionTable.jsx|  4 
 superset-frontend/src/SqlLab/components/TableElement.jsx  |  2 ++
 superset-frontend/src/components/Checkbox.jsx |  2 ++
 superset-frontend/src/components/CopyToClipboard.jsx  | 11 +--
 superset-frontend/src/components/PopoverSection.jsx   |  2 +-
 superset-frontend/src/components/RefreshLabel.jsx |  2 ++
 .../src/explore/components/AdhocFilterEditPopover.jsx |  2 ++
 .../src/explore/components/AdhocMetricEditPopover.jsx |  2 ++
 superset-frontend/src/explore/components/ControlHeader.jsx|  2 ++
 .../src/explore/components/ControlPanelSection.jsx|  6 +-
 .../src/explore/components/ControlPanelsContainer.jsx |  2 ++
 .../src/explore/components/ExploreActionButtons.jsx   |  4 
 superset-frontend/src/explore/components/SaveModal.jsx|  2 ++
 .../src/explore/components/controls/DatasourceControl.jsx |  2 ++
 .../src/explore/components/controls/VizTypeControl.jsx|  2 ++
 16 files changed, 43 insertions(+), 6 deletions(-)

diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js
index b40dabe..b240909 100644
--- a/superset-frontend/.eslintrc.js
+++ b/superset-frontend/.eslintrc.js
@@ -76,7 +76,6 @@ module.exports = {
 indent: 0,
 'jsx-a11y/anchor-has-content': 0,
 'jsx-a11y/href-no-hash': 0,
-'jsx-a11y/no-static-element-interactions': 0,
 'new-cap': 0,
 'no-bitwise': 0,
 'no-confusing-arrow': 0,
@@ -136,7 +135,6 @@ module.exports = {
 indent: 0,
 'jsx-a11y/anchor-has-content': 0,
 'jsx-a11y/href-no-hash': 0,
-'jsx-a11y/no-static-element-interactions': 0,
 'new-cap': 0,
 'no-bitwise': 0,
 'no-confusing-arrow': 0,
diff --git a/superset-frontend/src/CRUD/CollectionTable.jsx 
b/superset-frontend/src/CRUD/CollectionTable.jsx
index 74c6227..848d263 100644
--- a/superset-frontend/src/CRUD/CollectionTable.jsx
+++ b/superset-frontend/src/CRUD/CollectionTable.jsx
@@ -183,6 +183,8 @@ export default class CRUDCollection extends 
React.PureComponent {
   tds.push(
 
   
   
diff --git a/superset-frontend/src/SqlLab/components/TableElement.jsx 
b/superset-frontend/src/SqlLab/components/TableElement.jsx
index 5884611..31d7dee 100644
--- a/superset-frontend/src/SqlLab/components/TableElement.jsx
+++ b/superset-frontend/src/SqlLab/components/TableElement.jsx
@@ -212,6 +212,8 @@ class TableElement extends React.PureComponent {
 {this.renderControls()}
   )}
{
   this.toggleTable(e);
 }}
diff --git a/superset-frontend/src/components/Checkbox.jsx 
b/superset-frontend/src/components/Checkbox.jsx
index d068488..72d4384 100644
--- a/superset-frontend/src/components/Checkbox.jsx
+++ b/superset-frontend/src/components/Checkbox.jsx
@@ -29,6 +29,8 @@ export default function Checkbox({ checked, onChange, style 
}) {
   return (
 
   
 
-  
+  
 {this.props.copyNode}
   
 
diff --git a/superset-frontend/src/components/PopoverSection.jsx 
b/superset-frontend/src/components/PopoverSection.jsx
index 8c19f4b..8590b19 100644
--- a/superset-frontend/src/components/PopoverSection.jsx
+++ b/superset-frontend/src/components/PopoverSection.jsx
@@ -37,7 +37,7 @@ export default function PopoverSection({
 }) {
   return (
 
-  
+  
 {title} 
 {info && (
   
diff --git a/superset-frontend/src/components/RefreshLabel.jsx 
b/superset-frontend/src/components/RefreshLabel.jsx
index 87c852d..bbf89a2 100644
--- a/superset-frontend/src/components/RefreshLabel.jsx
+++ b/superset-frontend/src/components/RefreshLabel.jsx
@@ -32,6 +32,8 @@ class RefreshLabel extends React.PureComponent {
 return (
   
 
diff --git 
a/superset-frontend/src/explore/components/AdhocFilterEditPopover.jsx 
b/superset-frontend/src/explore/components/AdhocFilterEditPopover.jsx
index c808346..7fc48b6 100644
--- a/superset-frontend/src/explore/components/AdhocFilterEditPopover.jsx
+++ b/superset-frontend/src/explore/components/AdhocFilterEditPopover.jsx
@@ -183,6 +183,8 @@ export default class AdhocFilterEditPopover extends 
React.Component {
 Close
   
 

[incubator-superset] branch master updated: fix: group by with timestamp granularity (#10344)

2020-07-17 Thread dpgaspar
This is an automated email from the ASF dual-hosted git repository.

dpgaspar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new aaad452  fix: group by with timestamp granularity (#10344)
aaad452 is described below

commit aaad4522f0e1f9fb7b720d14c18716c37cdb4ff0
Author: Daniel Vaz Gaspar 
AuthorDate: Fri Jul 17 16:03:39 2020 +0100

fix: group by with timestamp granularity (#10344)

* fix, group by with timestamp granularity

* fix, bug found by mypy

* lint

* comment

* Following ville's solution

* lint and comments
---
 superset/connectors/sqla/models.py | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/superset/connectors/sqla/models.py 
b/superset/connectors/sqla/models.py
index c73152a..f571cbc 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -217,15 +217,16 @@ class TableColumn(Model, BaseColumn):
 return and_(*l)
 
 def get_timestamp_expression(
-self, time_grain: Optional[str]
+self, time_grain: Optional[str], label: Optional[str] = None
 ) -> Union[TimestampExpression, Label]:
 """
 Return a SQLAlchemy Core element representation of self to be used in 
a query.
 
 :param time_grain: Optional time grain, e.g. P1Y
+:param label: alias/label that column is expected to have
 :return: A TimeExpression object wrapped in a Label if supported by db
 """
-label = utils.DTTM_ALIAS
+label = label or utils.DTTM_ALIAS
 
 db_ = self.table.database
 pdf = self.python_date_format
@@ -816,6 +817,7 @@ class SqlaTable(  # pylint: 
disable=too-many-public-methods,too-many-instance-at
 select_exprs: List[Column] = []
 groupby_exprs_sans_timestamp = OrderedDict()
 
+assert extras is not None
 if (is_sip_38 and metrics and columns) or (not is_sip_38 and groupby):
 # dedup columns while preserving order
 columns_ = columns if is_sip_38 else groupby
@@ -824,7 +826,13 @@ class SqlaTable(  # pylint: 
disable=too-many-public-methods,too-many-instance-at
 
 select_exprs = []
 for selected in groupby:
-if selected in columns_by_name:
+# if groupby field/expr equals granularity field/expr
+if selected == granularity:
+time_grain = extras.get("time_grain_sqla")
+sqla_col = columns_by_name[selected]
+outer = sqla_col.get_timestamp_expression(time_grain, 
selected)
+# if groupby field equals a selected column
+elif selected in columns_by_name:
 outer = columns_by_name[selected].get_sqla_col()
 else:
 outer = literal_column(f"({selected})")
@@ -841,7 +849,6 @@ class SqlaTable(  # pylint: 
disable=too-many-public-methods,too-many-instance-at
 )
 metrics_exprs = []
 
-assert extras is not None
 time_range_endpoints = extras.get("time_range_endpoints")
 groupby_exprs_with_timestamp = 
OrderedDict(groupby_exprs_sans_timestamp.items())
 if granularity: