-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for druid data ingestion #14995
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work, @beinan
LGTM, only 2 minor issues
presto-druid/src/main/java/com/facebook/presto/druid/ingestion/DruidIngestTask.java
Outdated
Show resolved
Hide resolved
presto-druid/src/main/java/com/facebook/presto/druid/ingestion/DruidIngestTask.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @beinan is it possible to add insert into and CTAS tests in: TestDruidQueryGenerator?
Hey @zhenxiao I tried to make some unit test in TestDruidQueryGenerator. But looks like TableWriteNode is an InternalPlanNode, which cannot be passed into connector's optimizer. I got an exception as below `java.lang.IllegalArgumentException: PlanVisitor is only for connector to use; InternalPlanNode should never use it
` Is there any other way we can test insert into and ctas cases? |
get it. I think we might need to add end to end integration test for Druid. |
Ingest by CTAS
create table new_dataset7 as select localtimestamp as __time, 'beinan' as name, bigint '18' as age, double '188.88' as height;
Ingest by Insert:
insert into new_dataset7 select localtimestamp as __time, bigint '18' as age, double '288.88' as height, "Mike" as name;
or even more
insert into new_dataset7 SELECT cast(date_column as timestamp),bigint '18' as age, double '188.88' as height, 'aaa' as name FROM (VALUES (SEQUENCE(FROM_ISO8601_DATE('2010-01-01'), FROM_ISO8601_DATE('2020-12-31'), INTERVAL '1' DAY) ) ) AS t1(date_array) CROSS JOIN UNNEST(date_array) AS t2(date_column);
Limitation:
Currently only supports limited data types such as timestamp, varchar, bigint, double and float.