Skip to content

Commit dde02a1

Browse files
- Tidier.
1 parent ca2fbcc commit dde02a1

File tree

4 files changed

+744
-18
lines changed

4 files changed

+744
-18
lines changed

.vscode/launch.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@
159159
"SELECT instance_id FROM aws.ec2.instances WHERE region IN ('us-east-1', 'ap-southeast-2');",
160160
"SELECT instance_id FROM aws.ec2_solid_gold.instances WHERE region IN ('us-east-1', 'ap-southeast-2');",
161161
"SELECT region FROM aws.ec2_nextgen.instances WHERE region IN ('us-east-1', 'ap-southeast-2', 'ap-southeast-1') order by region, instance_id; SELECT region, instance_id, tenancy, security_groups FROM aws.ec2_nextgen.instances WHERE region IN ('us-east-1', 'ap-southeast-2', 'ap-southeast-1') order by region, instance_id; SELECT region, instance_id, tenancy, security_groups FROM aws.ec2_nextgen.instances WHERE region IN ('us-east-1', 'ap-southeast-2', 'ap-southeast-1') order by region, instance_id; SELECT region, instance_id, tenancy, security_groups FROM aws.ec2_nextgen.instances WHERE region IN ('us-east-1', 'ap-southeast-2', 'ap-southeast-1') order by region, instance_id; SELECT region, instance_id, tenancy, security_groups FROM aws.ec2_nextgen.instances WHERE region IN ('us-east-1', 'ap-southeast-2', 'ap-southeast-1') order by region, instance_id; SELECT region, instance_id, tenancy, security_groups FROM aws.ec2_nextgen.instances WHERE region IN ('us-east-1', 'ap-southeast-2', 'ap-southeast-1') order by region, instance_id;",
162-
"create or replace materialized view e1 as select json_extract(json_each.value, '$.Groups') as rez from aws.ce_native.cost_and_usage, json_each(ResultsByTime) where data__Granularity = 'MONTHLY' and data__Metrics = '[\"UnblendedCost\"]' and data__TimePeriod = '{\"Start\": \"2024-08-01\", \"End\": \"2024-11-30\"}' and data__GroupBy = '[{\"Type\":\"DIMENSION\",\"Key\":\"SERVICE\"}]' and region = 'us-east-1';"
163162
],
164163
"default": "show providers;"
165164
},

internal/stackql/astformat/ast_format_default.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,9 @@ func DefaultSelectExprsFormatter(buf *sqlparser.TrackedBuffer, node sqlparser.SQ
99
case sqlparser.ColIdent:
1010
formatColIdent(node, buf)
1111
return
12-
case *sqlparser.AliasedTableExpr:
13-
node.Format(buf)
14-
return
1512
case sqlparser.TableName:
1613
buf.WriteString(node.GetRawVal())
1714
return
18-
case *sqlparser.SQLVal:
19-
// switch node.Type {
20-
// case sqlparser.StrVal:
21-
// buf.Myprintf("%s", node.Val)
22-
// return
23-
// default:
24-
// node.Format(buf)
25-
// return
26-
// }
27-
node.Format(buf)
28-
return
2915
default:
3016
node.Format(buf)
3117
return

internal/stackql/parserutil/parser_util.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,6 @@ func RenderDDLSelectStmt(ddl *sqlparser.DDL) string {
936936

937937
func renderDDLSelectStmt(ddl *sqlparser.DDL) string {
938938
intermediateStr := astformat.String(ddl.SelectStatement, astformat.DefaultSelectExprsFormatter)
939-
// return strings.ReplaceAll(
940-
// intermediateStr, `"`, "")
941939
return intermediateStr
942940
}
943941

0 commit comments

Comments
 (0)