-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[Export] Expand function of export stmt #5445
Conversation
I will update document later. |
Done |
1. Support where clause in export stmt which only export selected rows. The syntax is following: Export table [table name] where [expr] To xxx xxxx It will filter table rows. Only rows that meet the where condition can be exported. 2. Support utf8 separator 3. Support export to local The syntax is following: Export table [table name] To (file:///xxx/xx/xx) If user export rows to local, the broker properties is not requried. User only need to create a local folder to store data, and fill in the path of the folder starting with file:// Change-Id: Ib7e7ece5accb3e359a67310b0bf006d42cd3f6f5
@@ -46,6 +46,8 @@ | |||
import java.util.List; | |||
import java.util.Map; | |||
|
|||
import static org.apache.doris.analysis.OutFileClause.LOCAL_FILE_PREFIX; |
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.
Don't using static import
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.
Ok
@@ -89,6 +99,8 @@ | |||
import java.util.UUID; | |||
import java.util.concurrent.atomic.AtomicInteger; | |||
|
|||
import static org.apache.doris.analysis.OutFileClause.LOCAL_FILE_PREFIX; |
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.
static import
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.
LGTM
1. Support where clause in export stmt which only export selected rows. The syntax is following: Export table [table name] where [expr] To xxx xxxx It will filter table rows. Only rows that meet the where condition can be exported. 2. Support utf8 separator 3. Support export to local The syntax is following: Export table [table name] To (file:///xxx/xx/xx) If user export rows to local, the broker properties is not requried. User only need to create a local folder to store data, and fill in the path of the folder starting with file:// Change-Id: Ib7e7ece5accb3e359a67310b0bf006d42cd3f6f5
Proposed changes
The syntax is following:
Export table [table name]
where [expr]
To xxx
xxxx
It will filter table rows.
Only rows that meet the where condition can be exported.
Support utf8 separator
Support export to local
The syntax is following:
Export table [table name]
To (file:///xxx/xx/xx)
If user export rows to local, the broker properties is not requried.
User only need to create a local folder to store data, and fill in the path of the folder starting with file://
Change-Id: Ib7e7ece5accb3e359a67310b0bf006d42cd3f6f5
Types of changes
What types of changes does your code introduce to Doris?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.