Skip to content

Commit

Permalink
Merge pull request databendlabs#1172 from sundy-li/typo
Browse files Browse the repository at this point in the history
[typo] JSONEachRaw => JSONEachRow
  • Loading branch information
sundy-li authored Jul 23, 2021
2 parents 79e3a99 + 825b355 commit f66beab
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion common/planners/src/plan_display_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn test_plan_display_indent() -> Result<()> {
db: "foo".into(),
table: "bar".into(),
schema,
engine: TableEngineType::JsonEachRaw,
engine: TableEngineType::JSONEachRow,
options,
});

Expand Down
4 changes: 2 additions & 2 deletions common/planners/src/plan_table_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use common_datavalues::DataSchemaRef;
#[derive(Debug, Clone, Copy, PartialEq, serde::Serialize, serde::Deserialize)]
pub enum TableEngineType {
/// Newline-delimited JSON
JsonEachRaw,
JSONEachRow,
/// Apache Parquet columnar store
Parquet,
/// Comma separated values
Expand All @@ -23,7 +23,7 @@ pub enum TableEngineType {
impl ToString for TableEngineType {
fn to_string(&self) -> String {
match self {
TableEngineType::JsonEachRaw => "JSON".into(),
TableEngineType::JSONEachRow => "JSON".into(),
TableEngineType::Parquet => "Parquet".into(),
TableEngineType::Csv => "CSV".into(),
TableEngineType::Null => "Null".into(),
Expand Down
6 changes: 3 additions & 3 deletions fusequery/query/src/sql/sql_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,17 +448,17 @@ impl<'a> DfParser<'a> {
match self.parser.next_token() {
Token::Word(w) => match &*w.value {
"Parquet" => Ok(TableEngineType::Parquet),
"JSONEachRaw" => Ok(TableEngineType::JsonEachRaw),
"JSONEachRow" => Ok(TableEngineType::JSONEachRow),
"CSV" => Ok(TableEngineType::Csv),
"Null" => Ok(TableEngineType::Null),
"Memory" => Ok(TableEngineType::Memory),
_ => self.expected(
"Engine must one of Parquet, JSONEachRaw, Null or CSV",
"Engine must be one of Parquet, JSONEachRow, Null, Memory or CSV",
Token::Word(w),
),
},
unexpected => self.expected(
"Engine must one of Parquet, JSONEachRaw, Null or CSV",
"Engine must be one of Parquet, JSONEachRow, Null, Memory or CSV",
unexpected,
),
}
Expand Down
2 changes: 1 addition & 1 deletion fusequery/query/src/sql/sql_parser_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ mod tests {
let sql = "CREATE TABLE t(c1 int) ENGINE = XX location = 'foo.parquet' ";
expect_parse_error(
sql,
"Expected Engine must one of Parquet, JSONEachRaw, Null or CSV, found: XX",
"Expected Engine must be one of Parquet, JSONEachRow, Null, Memory or CSV, found: XX",
)?;

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion fusestore/store/src/api/rpc/flight_service_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async fn test_flight_create_get_table() -> anyhow::Result<()> {
// TODO check get_table
options: maplit::hashmap! {"opt‐1".into() => "val-1".into()},
// TODO
engine: TableEngineType::JsonEachRaw,
engine: TableEngineType::JSONEachRow,
};

{
Expand Down
6 changes: 3 additions & 3 deletions fusestore/store/src/executor/action_handler_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ async fn test_action_handler_create_table() -> anyhow::Result<()> {
db: db_name.to_string(),
table: table_name.to_string(),
schema: schema.clone(),
engine: TableEngineType::JsonEachRaw,
engine: TableEngineType::JSONEachRow,
options: Default::default(),
};
let want = match want {
Expand Down Expand Up @@ -498,7 +498,7 @@ async fn test_action_handler_get_table() -> anyhow::Result<()> {
db: "foo".to_string(),
table: "foo_t1".to_string(),
schema: schema.clone(),
engine: TableEngineType::JsonEachRaw,
engine: TableEngineType::JSONEachRow,
options: Default::default(),
};
let cta = CreateTableAction { plan };
Expand Down Expand Up @@ -608,7 +608,7 @@ async fn test_action_handler_drop_table() -> anyhow::Result<()> {
db: "foo".to_string(),
table: "foo_t1".to_string(),
schema: schema.clone(),
engine: TableEngineType::JsonEachRaw,
engine: TableEngineType::JSONEachRow,
options: Default::default(),
};
let cta = CreateTableAction { plan };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name
```

!!! note
Local engine is one of `Memory`, `Parquet`, `JSONEachRaw`, `Null` or `CSV`, data will be stored in the FuseQuery memory/disk locally.
Local engine is one of `Memory`, `Parquet`, `JSONEachRow`, `Null` or `CSV`, data will be stored in the FuseQuery memory/disk locally.

Remote engine is `remote`, will be stored in the remote FuseStore cluster.

Expand Down

0 comments on commit f66beab

Please sign in to comment.