feat(product_analytics): general query fix
This commit is contained in:
parent
3e5f018b58
commit
a486af5749
2 changed files with 7 additions and 5 deletions
|
|
@ -49,10 +49,10 @@ var propertySelectorMap = map[string]string{
|
|||
}
|
||||
|
||||
var mainColumns = map[string]string{
|
||||
"userBrowser": "main.$browser",
|
||||
"userBrowser": "$browser",
|
||||
"userDevice": "sessions.user_device",
|
||||
"referrer": "main.$referrer",
|
||||
"ISSUE": "main.issue_type",
|
||||
"referrer": "$referrer",
|
||||
"ISSUE": "issue_type",
|
||||
}
|
||||
|
||||
func (t TableQueryBuilder) Execute(p Payload, conn db.Connector) (interface{}, error) {
|
||||
|
|
|
|||
|
|
@ -78,8 +78,10 @@ func getColumnAccessor(logical string, isNumeric bool, opts BuildConditionsOptio
|
|||
if col, ok := opts.DefinedColumns[logical]; ok {
|
||||
col = quote(col)
|
||||
if opts.MainTableAlias != "" {
|
||||
//return fmt.Sprintf("%s.%s", opts.MainTableAlias, col)
|
||||
return fmt.Sprintf("%s", col)
|
||||
if strings.Contains(col, ".") {
|
||||
return fmt.Sprintf("%s", col)
|
||||
}
|
||||
return fmt.Sprintf("%s.%s", opts.MainTableAlias, col)
|
||||
}
|
||||
return col
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue