[jira] [Commented] (CARBONDATA-479) Guarantee consistency for keyword LOCAL and file path in data loading command

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CARBONDATA-479) Guarantee consistency for keyword LOCAL and file path in data loading command

Akash R Nilugal (Jira)

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

Ravindra Pesala commented on CARBONDATA-479:
--------------------------------------------

LOCAL is only used to keep the syntax synchronize with Hive. Right now there is no effect of LOCAL keyword on loading flow.

> Guarantee consistency for keyword LOCAL and file path in data loading command
> -----------------------------------------------------------------------------
>
>                 Key: CARBONDATA-479
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-479
>             Project: CarbonData
>          Issue Type: Bug
>            Reporter: Lionx
>            Priority: Minor
>
> In CarbonSqlParser.scala,
> protected lazy val loadDataNew: Parser[LogicalPlan] =
>     LOAD ~> DATA ~> opt(LOCAL) ~> INPATH ~> stringLit ~ opt(OVERWRITE) ~
>     (INTO ~> TABLE ~> (ident <~ ".").? ~ ident) ~
>     (OPTIONS ~> "(" ~> repsep(loadOptions, ",") <~ ")").? <~ opt(";") ^^ {
>       case filePath ~ isOverwrite ~ table ~ optionsList =>
>         val (databaseNameOp, tableName) = table match {
>           case databaseName ~ tableName => (databaseName, tableName.toLowerCase())
>         }
>         if (optionsList.isDefined) {
>           validateOptions(optionsList)
>         }
>         val optionsMap = optionsList.getOrElse(List.empty[(String, String)]).toMap
>         LoadTable(databaseNameOp, tableName, filePath, Seq(), optionsMap,
>           isOverwrite.isDefined)
>     }
> It seems that using Keyword LOCAL impacts noting. Loading data from hdfs or file just depends on the path.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)