From b42b41cca7428b6dade4e2163e412fea4265fada Mon Sep 17 00:00:00 2001 From: extpvaan Date: Tue, 17 Feb 2015 09:44:18 +0200 Subject: [PATCH] Bind value of column "partitioned" as boolean, as it is defined in the "create table" ddl. --- .../io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java | 2 +- .../java/io/druid/metadata/SQLMetadataSegmentPublisher.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java b/server/src/main/java/io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java index 9027d4a4938..545ef25d996 100644 --- a/server/src/main/java/io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java +++ b/server/src/main/java/io/druid/metadata/IndexerSQLMetadataStorageCoordinator.java @@ -187,7 +187,7 @@ public class IndexerSQLMetadataStorageCoordinator implements IndexerMetadataStor .bind("created_date", new DateTime().toString()) .bind("start", segment.getInterval().getStart().toString()) .bind("end", segment.getInterval().getEnd().toString()) - .bind("partitioned", (segment.getShardSpec() instanceof NoneShardSpec) ? 0 : 1) + .bind("partitioned", (segment.getShardSpec() instanceof NoneShardSpec) ? false : true) .bind("version", segment.getVersion()) .bind("used", true) .bind("payload", jsonMapper.writeValueAsBytes(segment)) diff --git a/server/src/main/java/io/druid/metadata/SQLMetadataSegmentPublisher.java b/server/src/main/java/io/druid/metadata/SQLMetadataSegmentPublisher.java index f1ba63d0ce6..cdebad3647f 100644 --- a/server/src/main/java/io/druid/metadata/SQLMetadataSegmentPublisher.java +++ b/server/src/main/java/io/druid/metadata/SQLMetadataSegmentPublisher.java @@ -96,7 +96,7 @@ public class SQLMetadataSegmentPublisher implements MetadataSegmentPublisher .bind("created_date", new DateTime().toString()) .bind("start", segment.getInterval().getStart().toString()) .bind("end", segment.getInterval().getEnd().toString()) - .bind("partitioned", (segment.getShardSpec() instanceof NoneShardSpec) ? 0 : 1) + .bind("partitioned", (segment.getShardSpec() instanceof NoneShardSpec) ? false : true) .bind("version", segment.getVersion()) .bind("used", true) .bind("payload", jsonMapper.writeValueAsBytes(segment))