Skip to content

Commit 60315ba

Browse files
Add WITH ORDER display in information_schema.views
1 parent 82b1307 commit 60315ba

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

datafusion/sql/src/parser.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,19 @@ impl fmt::Display for CreateExternalTable {
243243
}
244244
write!(f, "{} ", self.name)?;
245245
write!(f, "STORED AS {} ", self.file_type)?;
246-
write!(f, "LOCATION {} ", self.location)
246+
if !self.order_exprs.is_empty() {
247+
write!(f, "WITH ORDER (")?;
248+
let mut first = true;
249+
for expr in self.order_exprs.iter().flatten() {
250+
if !first {
251+
write!(f, ", ")?;
252+
}
253+
write!(f, "{expr}")?;
254+
first = false;
255+
}
256+
write!(f, ") ")?;
257+
}
258+
write!(f, "LOCATION {}", self.location)
247259
}
248260
}
249261

0 commit comments

Comments
 (0)