mirror of
https://github.com/apache/superset.git
synced 2026-05-11 02:45:46 +00:00
Re-enable rule no-else-return (#10861)
This commit is contained in:
committed by
GitHub
parent
76275ec410
commit
2d8f4e3aaf
@@ -107,26 +107,32 @@ function getDefaultAggregateForColumn(column) {
|
||||
const { type } = column;
|
||||
if (typeof type !== 'string') {
|
||||
return AGGREGATES.COUNT;
|
||||
} else if (type === '' || type === 'expression') {
|
||||
}
|
||||
if (type === '' || type === 'expression') {
|
||||
return AGGREGATES.SUM;
|
||||
} else if (
|
||||
}
|
||||
if (
|
||||
type.match(/.*char.*/i) ||
|
||||
type.match(/string.*/i) ||
|
||||
type.match(/.*text.*/i)
|
||||
) {
|
||||
return AGGREGATES.COUNT_DISTINCT;
|
||||
} else if (
|
||||
}
|
||||
if (
|
||||
type.match(/.*int.*/i) ||
|
||||
type === 'LONG' ||
|
||||
type === 'DOUBLE' ||
|
||||
type === 'FLOAT'
|
||||
) {
|
||||
return AGGREGATES.SUM;
|
||||
} else if (type.match(/.*bool.*/i)) {
|
||||
}
|
||||
if (type.match(/.*bool.*/i)) {
|
||||
return AGGREGATES.MAX;
|
||||
} else if (type.match(/.*time.*/i)) {
|
||||
}
|
||||
if (type.match(/.*time.*/i)) {
|
||||
return AGGREGATES.COUNT;
|
||||
} else if (type.match(/unknown/i)) {
|
||||
}
|
||||
if (type.match(/unknown/i)) {
|
||||
return AGGREGATES.COUNT;
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -119,9 +119,11 @@ export default class SpatialControl extends React.Component {
|
||||
}
|
||||
if (this.state.type === spatialTypes.latlong) {
|
||||
return `${this.state.lonCol} | ${this.state.latCol}`;
|
||||
} else if (this.state.type === spatialTypes.delimited) {
|
||||
}
|
||||
if (this.state.type === spatialTypes.delimited) {
|
||||
return `${this.state.lonlatCol}`;
|
||||
} else if (this.state.type === spatialTypes.geohash) {
|
||||
}
|
||||
if (this.state.type === spatialTypes.geohash) {
|
||||
return `${this.state.geohashCol}`;
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user