Files
documentdb/Makefile.cflags
T
Deepak Bisht 58afe0aa8f Merged PR 1275776: [Pgmongo] - Part 1 GeoNear aggregation stage, add documentation and necessary operators and functions
### Does this PR have any customer impact?
No

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
Feature

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
Yes

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
Support $geoNear aggregation stage

### Description
Add the design doc and necessary operators and functions needed for $geoNear

Also,
1-  Implement the $geoNear aggregation stage skeleton and support all options.
     - `distanceField`,
     - `near` (both legacy, geojson point)
     -`includeLocs`,
     -`minDistance` & `maxDistance`
     - `distanceMultiplier`
     - `key`
2- Support index pushdown of the stage to `2d` and `2dspher` index.
    - spherical / non-spherical distance support for `2d` index.
    - spherical distance support for `2dsphere` index

Things still a TODO.
1- ~~Update the mongo explain plans for geonear stage~~.
2- Make the stage require an index always, currently it can be executed without index too.
3- Fix projection for nested array fields.
4- Make common test setup for running $geoNear queries in JSTests which don't require key in mongo.
5- More testing and validations with other stages that can use $geoNear.
6- Test batching and cursor support.
7- Overall testing and validations

Related work items: #3000189, #3065270
2024-04-19 12:03:52 +03:00

64 lines
2.4 KiB
Makefile

LIBBSON := $(shell pkg-config --cflags libbson-static-1.0)
INTEL_DECIMAL_MATH_LIB = $(shell pkg-config --cflags intelmathlib)
PCRE2_LIB = $(shell pkg-config --cflags libpcre2-8)
PG_CPPFLAGS = $(shell pkg-config --cflags libbson-static-1.0) -I$(libpq_srcdir) $(INTEL_DECIMAL_MATH_LIB) $(PCRE2_LIB) -Isrc -Iinclude -Ibuild/include/
PG_LDFLAGS = $(shell pkg-config --static --libs --cflags libbson-static-1.0) $(shell pkg-config --static --libs --cflags intelmathlib) $(shell pkg-config --static --libs --cflags libpcre2-8) -L/usr/lib
ifeq ($(CC),gcc)
PG_CFLAGS = -std=gnu99 -Wall -Wextra -Werror -Wno-declaration-after-statement -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-implicit-fallthrough $(LIBBSON) $(INTEL_DECIMAL_MATH_LIB) $(PCRE2_LIB)
else
PG_CFLAGS = -std=gnu99 -Wall -Wextra -Werror -Wno-declaration-after-statement -Wno-unused-parameter -Wno-implicit-fallthrough $(LIBBSON) $(INTEL_DECIMAL_MATH_LIB) $(PCRE2_LIB)
endif
ifneq ($(SKIP_API_SCHEMA),yes)
ifndef API_SCHEMA_NAME
$(error API_SCHEMA_NAME is not set)
endif
ifndef API_SCHEMA_INTERNAL_NAME
$(error API_SCHEMA_INTERNAL_NAME is not set)
endif
ifndef API_CATALOG_SCHEMA_NAME
$(error API_CATALOG_SCHEMA_NAME is not set)
endif
ifndef API_DATA_SCHEMA_NAME
$(error API_DATA_SCHEMA_NAME is not set)
endif
ifndef API_ADMIN_ROLE
$(error API_ADMIN_ROLE is not set)
endif
ifndef POSTGIS_SCHEMA_NAME
$(error POSTGIS_SCHEMA_NAME is not set)
endif
EXTENSION_SQL_ONLY_DEFINES = -D__API_CATALOG_SCHEMA__=$(API_CATALOG_SCHEMA_NAME) \
-D__API_SCHEMA__=$(API_SCHEMA_NAME) \
-D__API_SCHEMA_INTERNAL__=$(API_SCHEMA_INTERNAL_NAME) \
-D__API_DATA_SCHEMA__=$(API_DATA_SCHEMA_NAME) \
-D__API_ADMIN_ROLE_STR__=\'$(API_ADMIN_ROLE)\' \
-D__API_ADMIN_ROLE__=$(API_ADMIN_ROLE) \
-D__POSTGIS_SCHEMA_NAME__=$(POSTGIS_SCHEMA_NAME)
endif
ifndef CORE_SCHEMA_NAME
$(error CORE_SCHEMA_NAME is not set)
endif
ifndef EXTENSION_OBJECT_PREFIX
$(error EXTENSION_OBJECT_PREFIX is not set)
endif
EXTENSION_SQL_ONLY_DEFINES += -D__EXTENSION_OBJECT_PREFIX__=$(EXTENSION_OBJECT_PREFIX)
EXTENSION_SQL_ONLY_DEFINES += -D__CORE_SCHEMA__=$(CORE_SCHEMA_NAME)
SQL_DEFINES = $(EXTENSION_SQL_ONLY_DEFINES)