luoyuxia commented on code in PR #19520:
URL: https://github.com/apache/flink/pull/19520#discussion_r892231118


##########
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/planner/delegation/hive/copy/HiveParserSemanticAnalyzer.java:
##########
@@ -1792,61 +1791,42 @@ private void getMetaData(HiveParserQB qb, ReadEntity 
parentInput) throws HiveExc
                             }
                         }
 
-                        boolean isDfsFile = true;
-                        if (ast.getChildCount() >= 2
-                                && 
ast.getChild(1).getText().toLowerCase().equals("local")) {
-                            isDfsFile = false;
-                        }
+                        boolean isDfsFile =
+                                ast.getChildCount() < 2

Review Comment:
   for insert directory, the ast node will like 
   `TOK_DIR StringLiteral $local? tableRowFormat? tableFileFormat?`
   So, `ChildCount < 2` means there's no `local ` token, or the `ChildCount >= 
2` but the second token is not `local`, which means it's not to insert local 
directory.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to