Skip to content

Commit

Permalink
fix: some cr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
v0y4g3r committed May 22, 2024
1 parent a71c79f commit 01830b5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/mito2/src/compaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

mod buckets;
mod picker;
mod task;
#[cfg(test)]
mod test_util;
mod twcs;
mod window;

use std::collections::HashMap;
use std::sync::Arc;
use std::time::{Duration, Instant};
Expand Down Expand Up @@ -54,14 +62,6 @@ use crate::sst::file_purger::FilePurgerRef;
use crate::sst::version::LevelMeta;
use crate::worker::WorkerListener;

mod buckets;
mod picker;
mod task;
#[cfg(test)]
mod test_util;
mod twcs;
mod window;

/// Region compaction request.
pub struct CompactionRequest {
pub(crate) engine_config: Arc<MitoConfig>,
Expand Down
1 change: 1 addition & 0 deletions src/mito2/src/compaction/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ fn assign_files_to_time_windows<'a>(
}
let (start, end) = file.time_range();
let bounds = file_time_bucket_span(
// safety: converting whatever timestamp to seconds will not overflow.
start.convert_to(TimeUnit::Second).unwrap().value(),
end.convert_to(TimeUnit::Second).unwrap().value(),
bucket_sec,
Expand Down
1 change: 1 addition & 0 deletions src/session/src/table_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub fn table_name_to_full_name(
let obj_name = ParserContext::parse_table_name(name, query_ctx.sql_dialect())?;

let (catalog, schema, table) = table_idents_to_full_name(&obj_name, query_ctx)?;
// todo(hl): also check if schema matches when rbac is ready. https://github.com/GreptimeTeam/greptimedb/pull/3988/files#r1608687652
ensure!(
catalog == query_ctx.current_catalog(),
PermissionDeniedSnafu {
Expand Down

0 comments on commit 01830b5

Please sign in to comment.