|
10 | 10 | use std::collections::BTreeMap;
|
11 | 11 |
|
12 | 12 | use mz_catalog::builtin::BuiltinTable;
|
13 |
| -use mz_catalog::durable::{Transaction, Item}; |
14 |
| -use mz_catalog::memory::objects::{StateUpdate,BootstrapStateUpdateKind}; |
| 13 | +use mz_catalog::durable::Transaction; |
| 14 | +use mz_catalog::memory::objects::{BootstrapStateUpdateKind, StateUpdate}; |
15 | 15 | use mz_ore::collections::CollectionExt;
|
16 | 16 | use mz_ore::now::NowFn;
|
17 | 17 | use mz_repr::{CatalogItemId, GlobalId, Timestamp};
|
@@ -237,8 +237,8 @@ fn ast_rewrite_sources_to_tables(
|
237 | 237 | use mz_persist_types::ShardId;
|
238 | 238 | use mz_proto::RustType;
|
239 | 239 | use mz_sql::ast::{
|
240 |
| - CreateSourceConnection, CreateSourceOptionName, CreateSourceStatement, |
241 |
| - CreateSubsourceOptionName, CreateSubsourceStatement, CreateTableFromSourceStatement, Ident, |
| 240 | + CreateSourceConnection, CreateSourceStatement, CreateSubsourceOptionName, |
| 241 | + CreateSubsourceStatement, CreateTableFromSourceStatement, Ident, |
242 | 242 | KafkaSourceConfigOptionName, LoadGenerator, MySqlConfigOptionName, PgConfigOptionName,
|
243 | 243 | RawItemName, TableFromSourceColumns, TableFromSourceOption, TableFromSourceOptionName,
|
244 | 244 | UnresolvedItemName, Value, WithOptionValue,
|
@@ -515,7 +515,7 @@ fn ast_rewrite_sources_to_tables(
|
515 | 515 | include_metadata,
|
516 | 516 | format,
|
517 | 517 | envelope,
|
518 |
| - mut with_options, |
| 518 | + with_options, |
519 | 519 | if_not_exists,
|
520 | 520 | in_cluster,
|
521 | 521 | progress_subsource,
|
@@ -607,36 +607,13 @@ fn ast_rewrite_sources_to_tables(
|
607 | 607 | }
|
608 | 608 | _ => unreachable!("match determined above"),
|
609 | 609 | };
|
610 |
| - let mut table_with_options = vec![TableFromSourceOption { |
| 610 | + let table_with_options = vec![TableFromSourceOption { |
611 | 611 | name: TableFromSourceOptionName::Details,
|
612 | 612 | value: Some(WithOptionValue::Value(Value::String(hex::encode(
|
613 | 613 | details.into_proto().encode_to_vec(),
|
614 | 614 | )))),
|
615 | 615 | }];
|
616 | 616 |
|
617 |
| - // Move over the IgnoreKeys option if it exists. |
618 |
| - if let Some(i) = with_options |
619 |
| - .iter() |
620 |
| - .position(|opt| opt.name == CreateSourceOptionName::IgnoreKeys) |
621 |
| - { |
622 |
| - let option = with_options.remove(i); |
623 |
| - table_with_options.push(TableFromSourceOption { |
624 |
| - name: TableFromSourceOptionName::IgnoreKeys, |
625 |
| - value: option.value, |
626 |
| - }); |
627 |
| - }; |
628 |
| - // Move over the Timeline option if it exists. |
629 |
| - if let Some(i) = with_options |
630 |
| - .iter() |
631 |
| - .position(|opt| opt.name == CreateSourceOptionName::Timeline) |
632 |
| - { |
633 |
| - let option = with_options.remove(i); |
634 |
| - table_with_options.push(TableFromSourceOption { |
635 |
| - name: TableFromSourceOptionName::Timeline, |
636 |
| - value: option.value, |
637 |
| - }); |
638 |
| - } |
639 |
| - |
640 | 617 | // Generate the same external-reference that would have been generated
|
641 | 618 | // during purification for single-output sources.
|
642 | 619 | let external_reference = match &conn {
|
|
0 commit comments