trungda commented on code in PR #9013:
URL: https://github.com/apache/arrow-datafusion/pull/9013#discussion_r1468346885


##########
datafusion-cli/src/main.rs:
##########
@@ -136,6 +136,9 @@ struct Args {
         default_value = "40"
     )]
     maxrows: MaxRows,
+
+    #[clap(long, help = "Enables console syntax highlighting")]
+    color: bool,

Review Comment:
   maybe call this `syntax_highlighting`?



##########
datafusion-cli/src/highlighter.rs:
##########
@@ -30,20 +30,22 @@ use datafusion::sql::sqlparser::{
 use rustyline::highlight::Highlighter;
 
 /// The syntax highlighter.
+#[derive(Debug)]
 pub struct SyntaxHighlighter {
     dialect: Box<dyn Dialect>,
 }
 
 impl SyntaxHighlighter {
     pub fn new(dialect: &str) -> Self {
-        let dialect = match dialect_from_str(dialect) {
-            Some(dialect) => dialect,
-            None => Box::new(GenericDialect {}),
-        };
+        let dialect = 
dialect_from_str(dialect).unwrap_or(Box::new(GenericDialect {}));
         Self { dialect }
     }
 }
 
+pub struct NoSyntaxSyntaxHighlighter {}

Review Comment:
   `NoSyntaxHighlighter` (`Syntax` is duplicate)? 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to