hudi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "cdmikechen (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (HUDI-481) Support SQL-like method
Date Thu, 09 Jan 2020 01:13:00 GMT

    [ https://issues.apache.org/jira/browse/HUDI-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17011282#comment-17011282
] 

cdmikechen edited comment on HUDI-481 at 1/9/20 1:12 AM:
---------------------------------------------------------

[~vinoth]

Oh~ I‘ve seen in [https://github.com/apache/spark/blob/master/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4] 

Spark can recognize these keywords. 
  
 I have built a project to try to see if it is feasible first. I don't know if it is related
to V1 or V2. If I have a result, I will let you know as soon as possible


was (Author: chenxiang):
[~vinoth]

Oh~ I‘ve seen in [https://github.com/apache/spark/blob/master/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4] spark
can recognize these keywords. 
 
I have built a project to try to see if it is feasible first. I don't know if it is related
to V1 or V2. If I have a result, I will let you know as soon as possible

> Support SQL-like method
> -----------------------
>
>                 Key: HUDI-481
>                 URL: https://issues.apache.org/jira/browse/HUDI-481
>             Project: Apache Hudi (incubating)
>          Issue Type: Improvement
>          Components: CLI
>            Reporter: cdmikechen
>            Priority: Minor
>
> As we know, Hudi use spark datasource api to upsert data. For example, if we want to
update a data, we need to get the old row's data first, and use upsert method to update this
row.
> But there's another situation where someone just wants to update one column of data.
If we use a sql to describe, it is {{update table set col1 = X where col2 = Y}}. This is
something hudi cannot deal with directly at present, we can only get all the data involved
as a dataset first and then merge it.
> So I think maybe we can create a new subproject to process the batch data in an sql-like
method. For example.
>  {code}
> val hudiTable = new HudiTable(path)
> hudiTable.update.set("col1 = X").where("col2 = Y")
> hudiTable.delete.where("col3 = Z")
> hudiTable.commit
> {code}
> It may also extend the functionality and support jdbc-like RFC schemes: [https://cwiki.apache.org/confluence/display/HUDI/RFC+-+14+%3A+JDBC+incremental+puller]
> Hope every one can provide some suggestions to see if this plan is feasible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message