Skip to content

Commit

Permalink
resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jkosh44 committed Jan 8, 2025
1 parent 51647b6 commit 6462bfc
Showing 1 changed file with 6 additions and 29 deletions.
35 changes: 6 additions & 29 deletions src/adapter/src/catalog/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
use std::collections::BTreeMap;

use mz_catalog::builtin::BuiltinTable;
use mz_catalog::durable::{Transaction, Item};
use mz_catalog::memory::objects::{StateUpdate,BootstrapStateUpdateKind};
use mz_catalog::durable::Transaction;
use mz_catalog::memory::objects::{BootstrapStateUpdateKind, StateUpdate};
use mz_ore::collections::CollectionExt;
use mz_ore::now::NowFn;
use mz_repr::{CatalogItemId, GlobalId, Timestamp};
Expand Down Expand Up @@ -237,8 +237,8 @@ fn ast_rewrite_sources_to_tables(
use mz_persist_types::ShardId;
use mz_proto::RustType;
use mz_sql::ast::{
CreateSourceConnection, CreateSourceOptionName, CreateSourceStatement,
CreateSubsourceOptionName, CreateSubsourceStatement, CreateTableFromSourceStatement, Ident,
CreateSourceConnection, CreateSourceStatement, CreateSubsourceOptionName,
CreateSubsourceStatement, CreateTableFromSourceStatement, Ident,
KafkaSourceConfigOptionName, LoadGenerator, MySqlConfigOptionName, PgConfigOptionName,
RawItemName, TableFromSourceColumns, TableFromSourceOption, TableFromSourceOptionName,
UnresolvedItemName, Value, WithOptionValue,
Expand Down Expand Up @@ -515,7 +515,7 @@ fn ast_rewrite_sources_to_tables(
include_metadata,
format,
envelope,
mut with_options,
with_options,
if_not_exists,
in_cluster,
progress_subsource,
Expand Down Expand Up @@ -607,36 +607,13 @@ fn ast_rewrite_sources_to_tables(
}
_ => unreachable!("match determined above"),
};
let mut table_with_options = vec![TableFromSourceOption {
let table_with_options = vec![TableFromSourceOption {
name: TableFromSourceOptionName::Details,
value: Some(WithOptionValue::Value(Value::String(hex::encode(
details.into_proto().encode_to_vec(),
)))),
}];

// Move over the IgnoreKeys option if it exists.
if let Some(i) = with_options
.iter()
.position(|opt| opt.name == CreateSourceOptionName::IgnoreKeys)
{
let option = with_options.remove(i);
table_with_options.push(TableFromSourceOption {
name: TableFromSourceOptionName::IgnoreKeys,
value: option.value,
});
};
// Move over the Timeline option if it exists.
if let Some(i) = with_options
.iter()
.position(|opt| opt.name == CreateSourceOptionName::Timeline)
{
let option = with_options.remove(i);
table_with_options.push(TableFromSourceOption {
name: TableFromSourceOptionName::Timeline,
value: option.value,
});
}

// Generate the same external-reference that would have been generated
// during purification for single-output sources.
let external_reference = match &conn {
Expand Down

0 comments on commit 6462bfc

Please sign in to comment.