mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved hive sql parser support.
This commit is contained in:
@@ -6025,4 +6025,20 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean visit(SQLExternalRecordFormat x) {
|
||||
if (x.getDelimitedBy() != null) {
|
||||
println();
|
||||
print0(ucase ? "RECORDS DELIMITED BY " : "records delimited by ");
|
||||
x.getDelimitedBy().accept(this);
|
||||
}
|
||||
|
||||
if (x.getTerminatedBy() != null) {
|
||||
println();
|
||||
print0(ucase ? "FIELDS TERMINATED BY " : "fields terminated by ");
|
||||
x.getTerminatedBy().accept(this);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -799,4 +799,7 @@ public interface SQLASTVisitor {
|
||||
|
||||
boolean visit(SQLDropTypeStatement x);
|
||||
void endVisit(SQLDropTypeStatement x);
|
||||
|
||||
boolean visit(SQLExternalRecordFormat x);
|
||||
void endVisit(SQLExternalRecordFormat x);
|
||||
}
|
||||
|
||||
@@ -1866,6 +1866,14 @@ public class SQLASTVisitorAdapter implements SQLASTVisitor {
|
||||
|
||||
}
|
||||
|
||||
public boolean visit(SQLExternalRecordFormat x) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void endVisit(SQLExternalRecordFormat x) {
|
||||
|
||||
}
|
||||
|
||||
public final boolean isEnabled(VisitorFeature feature) {
|
||||
return VisitorFeature.isEnabled(this.features, feature);
|
||||
}
|
||||
|
||||
@@ -2416,4 +2416,9 @@ public class SchemaStatVisitor extends SQLASTVisitorAdapter {
|
||||
public boolean visit(SQLDropTypeStatement x) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(SQLExternalRecordFormat x) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user