Xiang Fu
--memory="1g" --cpus=".5"
in docker run
commandDan Hill
05/01/2020, 6:17 PMXiang Fu
Dan Hill
05/01/2020, 6:47 PMXiang Fu
Dan Hill
05/01/2020, 7:10 PMcom.facebook.presto.server.PrestoServer ======== SERVER STARTED ========
but any queries just get queued and don't run.presto:default> SELECT DATE_TRUNC('DAYS', "timestamp") as mydate, SUM(cost_usd_micros) FROM pinot.default.events_testing GROUP BY mydate;
Query 20200501_195448_00002_878qh failed: line 1:8: Unexpected parameters (varchar(4), bigint) for function date_trunc. Expected: date_trunc(varchar(x), date) , date_trunc(varchar(x), time) , date_trunc(varchar(x), time with time zone) , date_trunc(varchar(x), timestamp) , date_trunc(varchar(x), timestamp with time zone)
Xiang Fu
Dan Hill
05/01/2020, 7:56 PMpresto:default> DESCRIBE pinot.default.events_testing;
Column | Type | Extra | Comment
-----------------+--------+-------+-----------
cost_usd_micros | bigint | | METRIC
insertions | bigint | | METRIC
content_id | bigint | | DIMENSION
platform_id | bigint | | DIMENSION
clicks | bigint | | METRIC
impressions | bigint | | METRIC
customer_id | bigint | | DIMENSION
ad_group_id | bigint | | DIMENSION
campaign_id | bigint | | DIMENSION
advertiser_id | bigint | | DIMENSION
timestamp | bigint | | TIME
(11 rows)
Query 20200501_195558_00003_878qh, FINISHED, 1 node
Splits: 19 total, 19 done (100.00%)
0:04 [11 rows, 926B] [2 rows/s, 214B/s]
presto:default>
Xiang Fu
SELECT *date*(timestamp) as mydate, SUM(cost_usd_micros) FROM pinot.default.events_testing group by *date*(timestamp)
Dan Hill
05/01/2020, 7:59 PMpresto:default> SELECT DATE("timestamp") as mydate, SUM(cost_usd_micros) FROM pinot.default.events_testing GROUP BY mydate;
Query 20200501_195938_00006_878qh failed: line 1:8: Unexpected parameters (bigint) for function date. Expected: date(varchar(x)) , date(timestamp) , date(timestamp with time zone)
Xiang Fu
Dan Hill
05/01/2020, 8:01 PMQuery 20200501_200108_00013_878qh failed: <http://java.net|java.net>.UnknownHostException: pinot-broker-0.pinot-broker-headless.events-local.svc.cluster.local
presto:default> SELECT "timestamp", "impressions" FROM pinot.default.events_testing LIMIT 3;
timestamp | impressions
---------------+-------------
1554366550435 | 1
1565861533888 | 1
1569063656996 | 1
(3 rows)
Xiang Fu
"timeFieldSpec": {
"incomingGranularitySpec": {
"dataType": "LONG",
"timeType": "MILLISECONDS",
"name": "timestamp"
}
},
Dan Hill
05/01/2020, 8:32 PM"timeFieldSpec": {
"incomingGranularitySpec": {
"name": "timestamp",
"dataType": "LONG",
"timeFormat" : "EPOCH",
"timeType": "MILLISECONDS"
}
}
timeFormat
?Xiang Fu
Dan Hill
05/01/2020, 9:06 PMXiang Fu
Dan Hill
05/01/2020, 9:10 PMXiang Fu
presto:default> SELECT DATE_TRUNC('DAYS', "timestamp") as mydate, SUM(cost_usd_micros) FROM pinot.default.events GROUP BY DATE_TRUNC('DAYS', "timestamp");
mydate | _col1
--------+-------
(0 rows)
Query 20200501_211538_00009_5qeb6, FINISHED, 1 node
Splits: 49 total, 49 done (100.00%)
0:00 [0 rows, 0B] [0 rows/s, 0B/s]
Dan Hill
05/01/2020, 9:16 PMpresto:default> DESCRIBE pinot.default.events;
Column | Type | Extra | Comment
-----------------+--------+-------+-----------
cost_usd_micros | bigint | | METRIC
insertions | bigint | | METRIC
content_id | bigint | | DIMENSION
platform_id | bigint | | DIMENSION
clicks | bigint | | METRIC
impressions | bigint | | METRIC
customer_id | bigint | | DIMENSION
ad_group_id | bigint | | DIMENSION
campaign_id | bigint | | DIMENSION
advertiser_id | bigint | | DIMENSION
timestamp | bigint | | TIME
(11 rows)
Xiang Fu
pinot.use-date-trunc=true
pinot.infer-date-type-in-schema=true
pinot.infer-timestamp-type-in-schema=true
pinot.properties
etc
?Dan Hill
05/01/2020, 9:19 PMXiang Fu
Dan Hill
05/01/2020, 9:28 PM