|
12 | 12 | // See the License for the specific language governing permissions and
|
13 | 13 | // limitations under the License.
|
14 | 14 |
|
| 15 | +#include <Common/config.h> // For ENABLE_CLARA |
15 | 16 | #include <Interpreters/Context.h>
|
16 | 17 | #include <Storages/DeltaMerge/File/DMFileBlockInputStream.h>
|
17 |
| -#include <Storages/DeltaMerge/Index/FullTextIndex/Perf.h> |
18 |
| -#include <Storages/DeltaMerge/Index/FullTextIndex/Reader.h> |
19 |
| -#include <Storages/DeltaMerge/Index/FullTextIndex/Stream/BruteScoreInputStream.h> |
20 |
| -#include <Storages/DeltaMerge/Index/FullTextIndex/Stream/Ctx.h> |
21 |
| -#include <Storages/DeltaMerge/Index/FullTextIndex/Stream/DMFileInputStream.h> |
22 | 18 | #include <Storages/DeltaMerge/Index/VectorIndex/Perf.h>
|
23 | 19 | #include <Storages/DeltaMerge/Index/VectorIndex/Reader.h>
|
24 | 20 | #include <Storages/DeltaMerge/Index/VectorIndex/Stream/Ctx.h>
|
|
27 | 23 | #include <Storages/DeltaMerge/ReadThread/SegmentReader.h>
|
28 | 24 | #include <Storages/DeltaMerge/ScanContext.h>
|
29 | 25 |
|
| 26 | +#if ENABLE_CLARA |
| 27 | +#include <Storages/DeltaMerge/Index/FullTextIndex/Perf.h> |
| 28 | +#include <Storages/DeltaMerge/Index/FullTextIndex/Reader.h> |
| 29 | +#include <Storages/DeltaMerge/Index/FullTextIndex/Stream/BruteScoreInputStream.h> |
| 30 | +#include <Storages/DeltaMerge/Index/FullTextIndex/Stream/Ctx.h> |
| 31 | +#include <Storages/DeltaMerge/Index/FullTextIndex/Stream/DMFileInputStream.h> |
| 32 | +#endif |
30 | 33 | namespace DB::DM
|
31 | 34 | {
|
32 | 35 |
|
@@ -145,10 +148,12 @@ SkippableBlockInputStreamPtr DMFileBlockInputStreamBuilder::build(
|
145 | 148 | const RowKeyRanges & rowkey_ranges,
|
146 | 149 | const ScanContextPtr & scan_context)
|
147 | 150 | {
|
| 151 | + // Note: this file may not have index built |
148 | 152 | {
|
149 |
| - // Note: this file may not have index built |
| 153 | +#if ENABLE_CLARA |
150 | 154 | if (fts_index_ctx)
|
151 | 155 | return buildForFullTextIndex(dmfile, read_columns, rowkey_ranges, scan_context);
|
| 156 | +#endif |
152 | 157 | if (vec_index_ctx)
|
153 | 158 | return buildForVectorIndex(dmfile, read_columns, rowkey_ranges, scan_context);
|
154 | 159 | }
|
@@ -241,6 +246,7 @@ SkippableBlockInputStreamPtr DMFileBlockInputStreamBuilder::buildForVectorIndex(
|
241 | 246 | std::move(rest_columns_reader));
|
242 | 247 | }
|
243 | 248 |
|
| 249 | +#if ENABLE_CLARA |
244 | 250 | SkippableBlockInputStreamPtr DMFileBlockInputStreamBuilder::buildForFullTextIndex(
|
245 | 251 | const DMFilePtr & dmfile,
|
246 | 252 | const ColumnDefines & read_columns,
|
@@ -327,5 +333,6 @@ SkippableBlockInputStreamPtr DMFileBlockInputStreamBuilder::buildForFullTextInde
|
327 | 333 | dmfile,
|
328 | 334 | std::move(rest_columns_reader));
|
329 | 335 | }
|
| 336 | +#endif |
330 | 337 |
|
331 | 338 | } // namespace DB::DM
|
0 commit comments