diff --git a/src/generated/generated_aggregates.cpp b/src/generated/generated_aggregates.cpp index 23960f3b..d4261565 100644 --- a/src/generated/generated_aggregates.cpp +++ b/src/generated/generated_aggregates.cpp @@ -956,44 +956,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1013,21 +1007,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_0.cpp b/src/generated/generated_temporal_udfs_0.cpp index 54fe4f68..c939df0e 100644 --- a/src/generated/generated_temporal_udfs_0.cpp +++ b/src/generated/generated_temporal_udfs_0.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_1.cpp b/src/generated/generated_temporal_udfs_1.cpp index b63c0f47..57e55d7a 100644 --- a/src/generated/generated_temporal_udfs_1.cpp +++ b/src/generated/generated_temporal_udfs_1.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_10.cpp b/src/generated/generated_temporal_udfs_10.cpp index 27804709..14411f30 100644 --- a/src/generated/generated_temporal_udfs_10.cpp +++ b/src/generated/generated_temporal_udfs_10.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } @@ -1462,6 +1447,42 @@ static void Gen_jsonb_ne(DataChunk &args, ExpressionState &, Vector &result) { // ===== @ingroup meos_json_json ===== +static void Gen_concat_tjsonb_jsonb_invert_invert_no(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Jsonb *a2p = BlobToJsonb(a2); + Temporal *r = concat_tjsonb_jsonb_invert_invert_no(t, a2p); + free(a2p); free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_concat_tjsonb_jsonb_invert_invert(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Jsonb *a2p = BlobToJsonb(a2); + Temporal *r = concat_tjsonb_jsonb_invert_invert(t, a2p); + free(a2p); free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_concat_tjsonb_jsonb_invert_invert_rev(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t a2, string_t in, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Jsonb *a2p = BlobToJsonb(a2); + Temporal *r = concat_tjsonb_jsonb_invert_invert(t, a2p); + free(a2p); free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + static void Gen_concat_tjsonb_tjsonb(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1486,15 +1507,131 @@ static void Gen_contains_tjsonb_tjsonb(DataChunk &args, ExpressionState &, Vecto }); } -static void Gen_tjsonb_array_element(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_contains_tjsonb_tjsonb_rev(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t1 = BlobToTemporal(in1); + Temporal *t2 = BlobToTemporal(in2); + Temporal *r = (Temporal *) contains_tjsonb_tjsonb(t2, t1); + free(t1); free(t2); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjson_array_element(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in, int32_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjson_array_element(t, a2, null_handle_type_from_string(a3.GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjson_array_element_d(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, int32_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjson_array_element(t, a2, null_handle_type_from_string(string_t("use_json_null").GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjson_array_length(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + UnaryExecutor::ExecuteWithNulls(args.data[0], result, args.size(), + [&](string_t in, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjson_array_length(t); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjson_extract_path(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); auto rc = args.size(); + auto &lst = args.data[1]; lst.Flatten(rc); + auto &child = ListVector::GetEntry(lst); + child.Flatten(ListVector::GetListSize(lst)); nullHandleType c2 = (nullHandleType) 0; { auto &cv = args.data[2]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c2 = null_handle_type_from_string(v.ToString().c_str()); } - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, rc, + BinaryExecutor::ExecuteWithNulls(args.data[0], lst, result, rc, + [&](string_t in, list_entry_t le, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + int n = 0; + text **elems = ListToTextArr(child, le, &n); + Temporal *r = tjson_extract_path(t, elems, n, c2); + free(t); FreeTextArr(elems, n); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjson_strip_nulls(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, bool a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjson_strip_nulls(t, a2); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjson_strip_nulls_d(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + UnaryExecutor::ExecuteWithNulls(args.data[0], result, args.size(), + [&](string_t in, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjson_strip_nulls(t, false); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_array_element(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in, int32_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_array_element(t, a2, null_handle_type_from_string(a3.GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_array_element_d(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, int32_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_array_element(t, a2, null_handle_type_from_string(string_t("use_json_null").GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_array_element_text(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in, int32_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_array_element_text(t, a2, null_handle_type_from_string(a3.GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_array_element_text_d(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), [&](string_t in, int32_t a2, ValidityMask &mask, idx_t idx) -> string_t { Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_array_element(t, a2, false, c2); + Temporal *r = tjsonb_array_element_text(t, a2, null_handle_type_from_string(string_t("use_json_null").GetString().c_str())); free(t); return TemporalToBlobN(result, r, mask, idx); }); @@ -1627,7 +1764,26 @@ static void Gen_tjsonb_extract_path(DataChunk &args, ExpressionState &, Vector & Temporal *t = BlobToTemporal(in); int n = 0; text **elems = ListToTextArr(child, le, &n); - Temporal *r = tjsonb_extract_path(t, elems, n, false, c2); + Temporal *r = tjsonb_extract_path(t, elems, n, c2); + free(t); FreeTextArr(elems, n); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_extract_path_text(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + auto rc = args.size(); + auto &lst = args.data[1]; lst.Flatten(rc); + auto &child = ListVector::GetEntry(lst); + child.Flatten(ListVector::GetListSize(lst)); + nullHandleType c2 = (nullHandleType) 0; + { auto &cv = args.data[2]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c2 = null_handle_type_from_string(v.ToString().c_str()); } + BinaryExecutor::ExecuteWithNulls(args.data[0], lst, result, rc, + [&](string_t in, list_entry_t le, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + int n = 0; + text **elems = ListToTextArr(child, le, &n); + Temporal *r = tjsonb_extract_path_text(t, elems, n, c2); free(t); FreeTextArr(elems, n); return TemporalToBlobN(result, r, mask, idx); }); @@ -1655,256 +1811,1001 @@ static void Gen_tjsonb_insert(DataChunk &args, ExpressionState &, Vector &result free(c2); } -static void Gen_tjsonb_object_field(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_pretty(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - auto rc = args.size(); - nullHandleType c2 = (nullHandleType) 0; - { auto &cv = args.data[2]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c2 = null_handle_type_from_string(v.ToString().c_str()); } - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, rc, - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + UnaryExecutor::ExecuteWithNulls(args.data[0], result, args.size(), + [&](string_t in, ValidityMask &mask, idx_t idx) -> string_t { Temporal *t = BlobToTemporal(in); - auto p2 = MakeText(a2); - Temporal *r = tjsonb_object_field(t, p2, false, c2); - free(t); free(p2); + Temporal *r = tjsonb_pretty(t); + free(t); return TemporalToBlobN(result, r, mask, idx); }); } -static void Gen_tjsonb_path_exists(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_strip_nulls(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - auto rc = args.size(); - Jsonb *c2 = NULL; - { auto &cv = args.data[2]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c2 = BlobToJsonb(string_t(StringValue::Get(v))); } - bool c3 = (bool) 0; - { auto &cv = args.data[3]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c3 = v.GetValue(); } - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, rc, - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, bool a2, ValidityMask &mask, idx_t idx) -> string_t { Temporal *t = BlobToTemporal(in); - auto p2 = BlobToJsonpath(a2); - Temporal *r = tjsonb_path_exists(t, p2, c2, c3, false); - free(t); free(p2); + Temporal *r = tjsonb_strip_nulls(t, a2); + free(t); return TemporalToBlobN(result, r, mask, idx); }); - free(c2); } -static void Gen_tjsonb_path_match(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_strip_nulls_d(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - auto rc = args.size(); - Jsonb *c2 = NULL; - { auto &cv = args.data[2]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c2 = BlobToJsonb(string_t(StringValue::Get(v))); } - bool c3 = (bool) 0; - { auto &cv = args.data[3]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c3 = v.GetValue(); } - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, rc, - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + UnaryExecutor::ExecuteWithNulls(args.data[0], result, args.size(), + [&](string_t in, ValidityMask &mask, idx_t idx) -> string_t { Temporal *t = BlobToTemporal(in); - auto p2 = BlobToJsonpath(a2); - Temporal *r = tjsonb_path_match(t, p2, c2, c3, false); - free(t); free(p2); + Temporal *r = tjsonb_strip_nulls(t, false); + free(t); return TemporalToBlobN(result, r, mask, idx); }); - free(c2); } -static void Gen_tjsonb_path_query_array(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_to_tbigint(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - auto rc = args.size(); - Jsonb *c2 = NULL; - { auto &cv = args.data[2]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c2 = BlobToJsonb(string_t(StringValue::Get(v))); } - bool c3 = (bool) 0; - { auto &cv = args.data[3]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c3 = v.GetValue(); } - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, rc, - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { Temporal *t = BlobToTemporal(in); - auto p2 = BlobToJsonpath(a2); - Temporal *r = tjsonb_path_query_array(t, p2, c2, c3, false); - free(t); free(p2); + Temporal *r = tjsonb_to_tbigint(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); + free(t); return TemporalToBlobN(result, r, mask, idx); }); - free(c2); } -static void Gen_tjsonb_path_query_first(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_to_tbigint_d(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - auto rc = args.size(); - Jsonb *c2 = NULL; - { auto &cv = args.data[2]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c2 = BlobToJsonb(string_t(StringValue::Get(v))); } - bool c3 = (bool) 0; - { auto &cv = args.data[3]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c3 = v.GetValue(); } - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, rc, + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { Temporal *t = BlobToTemporal(in); - auto p2 = BlobToJsonpath(a2); - Temporal *r = tjsonb_path_query_first(t, p2, c2, c3, false); - free(t); free(p2); + Temporal *r = tjsonb_to_tbigint(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); + free(t); return TemporalToBlobN(result, r, mask, idx); }); - free(c2); } -static void Gen_tjsonb_pretty(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_to_tbool(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - UnaryExecutor::ExecuteWithNulls(args.data[0], result, args.size(), - [&](string_t in, ValidityMask &mask, idx_t idx) -> string_t { + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_pretty(t); + Temporal *r = tjsonb_to_tbool(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); free(t); return TemporalToBlobN(result, r, mask, idx); }); } -static void Gen_tjsonb_strip_nulls(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_to_tbool_d(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in, bool a2, ValidityMask &mask, idx_t idx) -> string_t { + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_strip_nulls(t, a2); + Temporal *r = tjsonb_to_tbool(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); free(t); return TemporalToBlobN(result, r, mask, idx); }); } -static void Gen_tjsonb_strip_nulls_d(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_to_tfloat(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 4; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + Temporal *x0 = BlobToTemporal(in0[i]); + Temporal *r = (Temporal *) tjsonb_to_tfloat(x0, in1[i].GetString().c_str(), interptype_from_string(in2[i].GetString().c_str()), null_handle_type_from_string(in3[i].GetString().c_str())); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_to_tfloat_d(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 3; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + Temporal *x0 = BlobToTemporal(in0[i]); + Temporal *r = (Temporal *) tjsonb_to_tfloat(x0, in1[i].GetString().c_str(), interptype_from_string(in2[i].GetString().c_str()), null_handle_type_from_string("raise_exception")); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_to_tfloat_interp_null_handle(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_tfloat_interp_null_handle(t, a2.GetString().c_str()); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_tgeogpoint(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 4; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + Temporal *x0 = BlobToTemporal(in0[i]); + Temporal *r = (Temporal *) tjsonb_to_tgeogpoint(x0, in1[i].GetString().c_str(), interptype_from_string(in2[i].GetString().c_str()), null_handle_type_from_string(in3[i].GetString().c_str())); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_to_tgeogpoint_d(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 3; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + Temporal *x0 = BlobToTemporal(in0[i]); + Temporal *r = (Temporal *) tjsonb_to_tgeogpoint(x0, in1[i].GetString().c_str(), interptype_from_string(in2[i].GetString().c_str()), null_handle_type_from_string("raise_exception")); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_to_tgeogpoint_interp_null_handle(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_tgeogpoint_interp_null_handle(t, a2.GetString().c_str()); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_tgeography(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_tgeography(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_tgeography_d(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_tgeography(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_tgeometry(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_tgeometry(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_tgeometry_d(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_tgeometry(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_tgeompoint(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 4; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + Temporal *x0 = BlobToTemporal(in0[i]); + Temporal *r = (Temporal *) tjsonb_to_tgeompoint(x0, in1[i].GetString().c_str(), interptype_from_string(in2[i].GetString().c_str()), null_handle_type_from_string(in3[i].GetString().c_str())); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_to_tgeompoint_d(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 3; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + Temporal *x0 = BlobToTemporal(in0[i]); + Temporal *r = (Temporal *) tjsonb_to_tgeompoint(x0, in1[i].GetString().c_str(), interptype_from_string(in2[i].GetString().c_str()), null_handle_type_from_string("raise_exception")); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_to_tgeompoint_interp_null_handle(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_tgeompoint_interp_null_handle(t, a2.GetString().c_str()); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_tint(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_tint(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_tint_d(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_tint(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_ttext_key(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_ttext_key(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_tjsonb_to_ttext_key_d(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { + Temporal *t = BlobToTemporal(in); + Temporal *r = tjsonb_to_ttext_key(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); + free(t); + return TemporalToBlobN(result, r, mask, idx); + }); +} + +static void Gen_contains_tjsonb_jsonb(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + Jsonb *p1 = BlobToJsonb(in1[i]); + Temporal *r = (Temporal *) contains_tjsonb_jsonb(p0, p1, false); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_contains_tjsonb_jsonb_v1(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Jsonb *p0 = BlobToJsonb(in0[i]); + Temporal *p1 = BlobToTemporal(in1[i]); + Temporal *r = (Temporal *) contains_tjsonb_jsonb(p1, p0, true); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_contains_tjsonb_jsonb_v2(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Jsonb *p0 = BlobToJsonb(in0[i]); + Temporal *p1 = BlobToTemporal(in1[i]); + Temporal *r = (Temporal *) contains_tjsonb_jsonb(p1, p0, false); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_contains_tjsonb_jsonb_v3(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + Jsonb *p1 = BlobToJsonb(in1[i]); + Temporal *r = (Temporal *) contains_tjsonb_jsonb(p0, p1, true); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjson_object_field(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + text *p1 = MakeText(in1[i]); + Temporal *r = (Temporal *) tjson_object_field(p0, p1, null_handle_type_from_string(in2[i].GetString().c_str())); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjson_object_field_v1(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + text *p1 = MakeText(in1[i]); + Temporal *r = (Temporal *) tjson_object_field(p0, p1, null_handle_type_from_string("use_json_null")); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_object_field(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + text *p1 = MakeText(in1[i]); + Temporal *r = (Temporal *) tjsonb_object_field(p0, p1, null_handle_type_from_string(in2[i].GetString().c_str())); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_object_field_v1(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + text *p1 = MakeText(in1[i]); + Temporal *r = (Temporal *) tjsonb_object_field(p0, p1, null_handle_type_from_string("use_json_null")); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_object_field_text(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + text *p1 = MakeText(in1[i]); + Temporal *r = (Temporal *) tjsonb_object_field_text(p0, p1, null_handle_type_from_string(in2[i].GetString().c_str())); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_object_field_text_v1(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + text *p1 = MakeText(in1[i]); + Temporal *r = (Temporal *) tjsonb_object_field_text(p0, p1, null_handle_type_from_string("use_json_null")); + free(p0); + free(p1); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_path_exists(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[3]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_exists(p0, p1, p2, in3[i], false); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_path_exists_v1(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_exists(p0, p1, p2, false, false); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_path_exists_v2(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[3]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_exists(p0, p1, p2, in3[i], true); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_tjsonb_path_exists_v3(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - UnaryExecutor::ExecuteWithNulls(args.data[0], result, args.size(), - [&](string_t in, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_strip_nulls(t, false); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_exists(p0, p1, p2, false, true); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tbigint(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_match(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), - [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tbigint(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[3]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_match(p0, p1, p2, in3[i], false); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tbigint_d(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_match_v1(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tbigint(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_match(p0, p1, p2, false, false); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tbool(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_match_v2(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), - [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tbool(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[3]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_match(p0, p1, p2, in3[i], true); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tbool_d(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_match_v3(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tbool(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_match(p0, p1, p2, false, true); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tgeography(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_query_array(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), - [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tgeography(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[3]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_query_array(p0, p1, p2, in3[i], false); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tgeography_d(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_query_array_v1(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tgeography(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_query_array(p0, p1, p2, false, false); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tgeometry(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_query_array_v2(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), - [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tgeometry(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[3]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_query_array(p0, p1, p2, in3[i], true); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tgeometry_d(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_query_array_v3(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tgeometry(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_query_array(p0, p1, p2, false, true); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tint(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_query_first(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), - [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tint(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[3]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_query_first(p0, p1, p2, in3[i], false); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_tint_d(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_query_first_v1(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_tint(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_query_first(p0, p1, p2, false, false); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_ttext_key(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_query_first_v2(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), - [&](string_t in, string_t a2, string_t a3, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_ttext_key(t, a2.GetString().c_str(), null_handle_type_from_string(a3.GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 4; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto in3 = FlatVector::GetData(args.data[3]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[3]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_query_first(p0, p1, p2, in3[i], true); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_tjsonb_to_ttext_key_d(DataChunk &args, ExpressionState &, Vector &result) { +static void Gen_tjsonb_path_query_first_v3(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in, string_t a2, ValidityMask &mask, idx_t idx) -> string_t { - Temporal *t = BlobToTemporal(in); - Temporal *r = tjsonb_to_ttext_key(t, a2.GetString().c_str(), null_handle_type_from_string(string_t("raise_exception").GetString().c_str())); - free(t); - return TemporalToBlobN(result, r, mask, idx); - }); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 3; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto in2 = FlatVector::GetData(args.data[2]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + if (!FlatVector::Validity(args.data[0]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[1]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + if (!FlatVector::Validity(args.data[2]).RowIsValid(i)) { outv.SetInvalid(i); continue; } + Temporal *p0 = BlobToTemporal(in0[i]); + JsonPath *p1 = BlobToJsonpath(in1[i]); + Jsonb *p2 = BlobToJsonb(in2[i]); + Temporal *r = (Temporal *) tjsonb_path_query_first(p0, p1, p2, false, true); + free(p0); + free(p1); + free(p2); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = TemporalToBlob(result, r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } @@ -6390,11 +7291,25 @@ void RegisterGenerated_meos_json_base_comp(ExtensionLoader &loader) { } void RegisterGenerated_meos_json_json(ExtensionLoader &loader) { + RegisterSerializedScalarFunction(loader, ScalarFunction("tConcat", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonb()}, TJsonbTypes::tjsonb(), Gen_concat_tjsonb_jsonb_invert_invert_no)); + RegisterSerializedScalarFunction(loader, ScalarFunction("||", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonb()}, TJsonbTypes::tjsonb(), Gen_concat_tjsonb_jsonb_invert_invert_no)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tConcat", {TJsonbTypes::jsonb(), TJsonbTypes::tjsonb()}, TJsonbTypes::tjsonb(), Gen_concat_tjsonb_jsonb_invert_invert_rev)); + RegisterSerializedScalarFunction(loader, ScalarFunction("||", {TJsonbTypes::jsonb(), TJsonbTypes::tjsonb()}, TJsonbTypes::tjsonb(), Gen_concat_tjsonb_jsonb_invert_invert_rev)); RegisterSerializedScalarFunction(loader, ScalarFunction("tConcat", {TJsonbTypes::tjsonb(), TJsonbTypes::tjsonb()}, TJsonbTypes::tjsonb(), Gen_concat_tjsonb_tjsonb)); RegisterSerializedScalarFunction(loader, ScalarFunction("||", {TJsonbTypes::tjsonb(), TJsonbTypes::tjsonb()}, TJsonbTypes::tjsonb(), Gen_concat_tjsonb_tjsonb)); RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbContains", {TJsonbTypes::tjsonb(), TJsonbTypes::tjsonb()}, TemporalTypes::tbool(), Gen_contains_tjsonb_tjsonb)); RegisterSerializedScalarFunction(loader, ScalarFunction("@>", {TJsonbTypes::tjsonb(), TJsonbTypes::tjsonb()}, TemporalTypes::tbool(), Gen_contains_tjsonb_tjsonb)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbContained", {TJsonbTypes::tjsonb(), TJsonbTypes::tjsonb()}, TemporalTypes::tbool(), Gen_contains_tjsonb_tjsonb_rev)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonArrayElement", {TemporalTypes::ttext(), LogicalType::INTEGER, LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjson_array_element)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonArrayElement", {TemporalTypes::ttext(), LogicalType::INTEGER}, TemporalTypes::ttext(), Gen_tjson_array_element_d)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonArrayLength", {TemporalTypes::ttext()}, TemporalTypes::tint(), Gen_tjson_array_length)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonExtractPath", {TemporalTypes::ttext(), LogicalType::LIST(LogicalType::VARCHAR), LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjson_extract_path)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonStripNulls", {TemporalTypes::ttext(), LogicalType::BOOLEAN}, TemporalTypes::ttext(), Gen_tjson_strip_nulls)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonStripNulls", {TemporalTypes::ttext()}, TemporalTypes::ttext(), Gen_tjson_strip_nulls_d)); RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbArrayElement", {TJsonbTypes::tjsonb(), LogicalType::INTEGER, LogicalType::VARCHAR}, TJsonbTypes::tjsonb(), Gen_tjsonb_array_element)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbArrayElement", {TJsonbTypes::tjsonb(), LogicalType::INTEGER}, TJsonbTypes::tjsonb(), Gen_tjsonb_array_element_d)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbArrayElementText", {TJsonbTypes::tjsonb(), LogicalType::INTEGER, LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjsonb_array_element_text)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbArrayElementText", {TJsonbTypes::tjsonb(), LogicalType::INTEGER}, TemporalTypes::ttext(), Gen_tjsonb_array_element_text_d)); RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbArrayLength", {TJsonbTypes::tjsonb()}, TemporalTypes::tint(), Gen_tjsonb_array_length)); RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbDelete", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TJsonbTypes::tjsonb(), Gen_tjsonb_delete)); RegisterSerializedScalarFunction(loader, ScalarFunction("-", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TJsonbTypes::tjsonb(), Gen_tjsonb_delete)); @@ -6410,12 +7325,8 @@ void RegisterGenerated_meos_json_json(ExtensionLoader &loader) { RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbExistsAny", {TJsonbTypes::tjsonb(), LogicalType::LIST(LogicalType::VARCHAR)}, TemporalTypes::tbool(), Gen_tjsonb_exists_any)); RegisterSerializedScalarFunction(loader, ScalarFunction("?|", {TJsonbTypes::tjsonb(), LogicalType::LIST(LogicalType::VARCHAR)}, TemporalTypes::tbool(), Gen_tjsonb_exists_any)); RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbExtractPath", {TJsonbTypes::tjsonb(), LogicalType::LIST(LogicalType::VARCHAR), LogicalType::VARCHAR}, TJsonbTypes::tjsonb(), Gen_tjsonb_extract_path)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbExtractPathText", {TJsonbTypes::tjsonb(), LogicalType::LIST(LogicalType::VARCHAR), LogicalType::VARCHAR}, TJsonbTypes::tjsonb(), Gen_tjsonb_extract_path_text)); RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbInsert", {TJsonbTypes::tjsonb(), LogicalType::LIST(LogicalType::VARCHAR), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TJsonbTypes::tjsonb(), Gen_tjsonb_insert)); - RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbObjectField", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TJsonbTypes::tjsonb(), Gen_tjsonb_object_field)); - RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathExists", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TemporalTypes::tbool(), Gen_tjsonb_path_exists)); - RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathMatch", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TemporalTypes::tbool(), Gen_tjsonb_path_match)); - RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryArray", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_array)); - RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryFirst", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_first)); RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPretty", {TJsonbTypes::tjsonb()}, TemporalTypes::ttext(), Gen_tjsonb_pretty)); RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbStripNulls", {TJsonbTypes::tjsonb(), LogicalType::BOOLEAN}, TJsonbTypes::tjsonb(), Gen_tjsonb_strip_nulls)); RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbStripNulls", {TJsonbTypes::tjsonb()}, TJsonbTypes::tjsonb(), Gen_tjsonb_strip_nulls_d)); @@ -6423,14 +7334,52 @@ void RegisterGenerated_meos_json_json(ExtensionLoader &loader) { RegisterSerializedScalarFunction(loader, ScalarFunction("tbigint", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TemporalTypes::tbigint(), Gen_tjsonb_to_tbigint_d)); RegisterSerializedScalarFunction(loader, ScalarFunction("tbool", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TemporalTypes::tbool(), Gen_tjsonb_to_tbool)); RegisterSerializedScalarFunction(loader, ScalarFunction("tbool", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TemporalTypes::tbool(), Gen_tjsonb_to_tbool_d)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tfloat", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::VARCHAR}, TemporalTypes::tfloat(), Gen_tjsonb_to_tfloat)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tfloat", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TemporalTypes::tfloat(), Gen_tjsonb_to_tfloat_d)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tfloat", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TemporalTypes::tfloat(), Gen_tjsonb_to_tfloat_interp_null_handle)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tgeogpoint", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::VARCHAR}, TgeogpointType::tgeogpoint(), Gen_tjsonb_to_tgeogpoint)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tgeogpoint", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TgeogpointType::tgeogpoint(), Gen_tjsonb_to_tgeogpoint_d)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tgeogpoint", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TgeogpointType::tgeogpoint(), Gen_tjsonb_to_tgeogpoint_interp_null_handle)); RegisterSerializedScalarFunction(loader, ScalarFunction("tgeography", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TGeographyTypes::tgeography(), Gen_tjsonb_to_tgeography)); RegisterSerializedScalarFunction(loader, ScalarFunction("tgeography", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TGeographyTypes::tgeography(), Gen_tjsonb_to_tgeography_d)); RegisterSerializedScalarFunction(loader, ScalarFunction("tgeometry", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TGeometryTypes::tgeometry(), Gen_tjsonb_to_tgeometry)); RegisterSerializedScalarFunction(loader, ScalarFunction("tgeometry", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TGeometryTypes::tgeometry(), Gen_tjsonb_to_tgeometry_d)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tgeompoint", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR, LogicalType::VARCHAR}, TgeompointType::tgeompoint(), Gen_tjsonb_to_tgeompoint)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tgeompoint", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TgeompointType::tgeompoint(), Gen_tjsonb_to_tgeompoint_d)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tgeompoint", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TgeompointType::tgeompoint(), Gen_tjsonb_to_tgeompoint_interp_null_handle)); RegisterSerializedScalarFunction(loader, ScalarFunction("tint", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TemporalTypes::tint(), Gen_tjsonb_to_tint)); RegisterSerializedScalarFunction(loader, ScalarFunction("tint", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TemporalTypes::tint(), Gen_tjsonb_to_tint_d)); RegisterSerializedScalarFunction(loader, ScalarFunction("ttext", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjsonb_to_ttext_key)); RegisterSerializedScalarFunction(loader, ScalarFunction("ttext", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjsonb_to_ttext_key_d)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbContains", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonb()}, TemporalTypes::tbool(), Gen_contains_tjsonb_jsonb)); + RegisterSerializedScalarFunction(loader, ScalarFunction("@>", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonb()}, TemporalTypes::tbool(), Gen_contains_tjsonb_jsonb)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbContains", {TJsonbTypes::jsonb(), TJsonbTypes::tjsonb()}, TemporalTypes::tbool(), Gen_contains_tjsonb_jsonb_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("@>", {TJsonbTypes::jsonb(), TJsonbTypes::tjsonb()}, TemporalTypes::tbool(), Gen_contains_tjsonb_jsonb_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbContained", {TJsonbTypes::jsonb(), TJsonbTypes::tjsonb()}, TemporalTypes::tbool(), Gen_contains_tjsonb_jsonb_v2)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbContained", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonb()}, TemporalTypes::tbool(), Gen_contains_tjsonb_jsonb_v3)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonObjectField", {TemporalTypes::ttext(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjson_object_field)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonObjectField", {TemporalTypes::ttext(), LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjson_object_field_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbObjectField", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TJsonbTypes::tjsonb(), Gen_tjsonb_object_field)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbObjectField", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TJsonbTypes::tjsonb(), Gen_tjsonb_object_field_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbObjectFieldText", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR, LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjsonb_object_field_text)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbObjectFieldText", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjsonb_object_field_text_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("->>", {TJsonbTypes::tjsonb(), LogicalType::VARCHAR}, TemporalTypes::ttext(), Gen_tjsonb_object_field_text_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathExists", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TemporalTypes::tbool(), Gen_tjsonb_path_exists)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathExists", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb()}, TemporalTypes::tbool(), Gen_tjsonb_path_exists_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathExistsTz", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TemporalTypes::tbool(), Gen_tjsonb_path_exists_v2)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathExistsTz", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb()}, TemporalTypes::tbool(), Gen_tjsonb_path_exists_v3)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathMatch", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TemporalTypes::tbool(), Gen_tjsonb_path_match)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathMatch", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb()}, TemporalTypes::tbool(), Gen_tjsonb_path_match_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathMatchTz", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TemporalTypes::tbool(), Gen_tjsonb_path_match_v2)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathMatchTz", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb()}, TemporalTypes::tbool(), Gen_tjsonb_path_match_v3)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryArray", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_array)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryArray", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb()}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_array_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryArrayTz", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_array_v2)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryArrayTz", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb()}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_array_v3)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryFirst", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_first)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryFirst", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb()}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_first_v1)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryFirstTz", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_first_v2)); + RegisterSerializedScalarFunction(loader, ScalarFunction("tjsonbPathQueryFirstTz", {TJsonbTypes::tjsonb(), TJsonbTypes::jsonpath(), TJsonbTypes::jsonb()}, TJsonbTypes::tjsonb(), Gen_tjsonb_path_query_first_v3)); } void RegisterGenerated_meos_pointcloud_box_inout(ExtensionLoader &loader) { diff --git a/src/generated/generated_temporal_udfs_11.cpp b/src/generated/generated_temporal_udfs_11.cpp index 9911494d..2990b105 100644 --- a/src/generated/generated_temporal_udfs_11.cpp +++ b/src/generated/generated_temporal_udfs_11.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_12.cpp b/src/generated/generated_temporal_udfs_12.cpp index fb5df415..cce96c38 100644 --- a/src/generated/generated_temporal_udfs_12.cpp +++ b/src/generated/generated_temporal_udfs_12.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_13.cpp b/src/generated/generated_temporal_udfs_13.cpp index 5f71a9d9..1eaffc03 100644 --- a/src/generated/generated_temporal_udfs_13.cpp +++ b/src/generated/generated_temporal_udfs_13.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_14.cpp b/src/generated/generated_temporal_udfs_14.cpp index 91490fb5..20114777 100644 --- a/src/generated/generated_temporal_udfs_14.cpp +++ b/src/generated/generated_temporal_udfs_14.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } @@ -1374,6 +1359,19 @@ static void Gen_acontains_tcbuffer_geo(DataChunk &args, ExpressionState &, Vecto }); } +static void Gen_acontains_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t1 = BlobToTemporal(in1); + Temporal *t2 = BlobToTemporal(in2); + int32_t r = acontains_tcbuffer_tcbuffer(t1, t2); + free(t1); free(t2); + if (r < 0) { mask.SetInvalid(idx); return bool(); } + return (r != 0); + }); +} + static void Gen_acovers_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1421,6 +1419,36 @@ static void Gen_acovers_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector }); } +static void Gen_acovers_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t1 = BlobToTemporal(in1); + Temporal *t2 = BlobToTemporal(in2); + int32_t r = acovers_tcbuffer_tcbuffer(t1, t2); + free(t1); free(t2); + if (r < 0) { mask.SetInvalid(idx); return bool(); } + return (r != 0); + }); +} + +static void Gen_adisjoint_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in_g, string_t in_t, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t = BlobToTemporal(in_t); + GSERIALIZED *gs = GeometryToGSerialized(in_g, tspatial_srid(t)); + if (MEOS_FLAGS_GET_GEODETIC(t->flags)) { + GSERIALIZED *gs_geog = geom_to_geog(gs); + free(gs); gs = gs_geog; + } + int r = adisjoint_geo_tcbuffer(gs, t); + free(t); free(gs); + if (r < 0) { mask.SetInvalid(idx); return false; } + return r != 0; + }); +} + static void Gen_adisjoint_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1464,6 +1492,23 @@ static void Gen_adisjoint_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, }); } +static void Gen_adwithin_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in_g, string_t in_t, double d, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t = BlobToTemporal(in_t); + GSERIALIZED *gs = GeometryToGSerialized(in_g, tspatial_srid(t)); + if (MEOS_FLAGS_GET_GEODETIC(t->flags)) { + GSERIALIZED *gs_geog = geom_to_geog(gs); + free(gs); gs = gs_geog; + } + int r = adwithin_geo_tcbuffer(gs, t, d); + free(t); free(gs); + if (r < 0) { mask.SetInvalid(idx); return false; } + return r != 0; + }); +} + static void Gen_adwithin_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), @@ -1494,6 +1539,23 @@ static void Gen_adwithin_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, V }); } +static void Gen_aintersects_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in_g, string_t in_t, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t = BlobToTemporal(in_t); + GSERIALIZED *gs = GeometryToGSerialized(in_g, tspatial_srid(t)); + if (MEOS_FLAGS_GET_GEODETIC(t->flags)) { + GSERIALIZED *gs_geog = geom_to_geog(gs); + free(gs); gs = gs_geog; + } + int r = aintersects_geo_tcbuffer(gs, t); + free(t); free(gs); + if (r < 0) { mask.SetInvalid(idx); return false; } + return r != 0; + }); +} + static void Gen_aintersects_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1537,6 +1599,23 @@ static void Gen_aintersects_tcbuffer_tcbuffer(DataChunk &args, ExpressionState & }); } +static void Gen_atouches_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in_g, string_t in_t, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t = BlobToTemporal(in_t); + GSERIALIZED *gs = GeometryToGSerialized(in_g, tspatial_srid(t)); + if (MEOS_FLAGS_GET_GEODETIC(t->flags)) { + GSERIALIZED *gs_geog = geom_to_geog(gs); + free(gs); gs = gs_geog; + } + int r = atouches_geo_tcbuffer(gs, t); + free(t); free(gs); + if (r < 0) { mask.SetInvalid(idx); return false; } + return r != 0; + }); +} + static void Gen_atouches_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1567,6 +1646,36 @@ static void Gen_atouches_tcbuffer_cbuffer(DataChunk &args, ExpressionState &, Ve }); } +static void Gen_atouches_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t1 = BlobToTemporal(in1); + Temporal *t2 = BlobToTemporal(in2); + int32_t r = atouches_tcbuffer_tcbuffer(t1, t2); + free(t1); free(t2); + if (r < 0) { mask.SetInvalid(idx); return bool(); } + return (r != 0); + }); +} + +static void Gen_econtains_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in_g, string_t in_t, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t = BlobToTemporal(in_t); + GSERIALIZED *gs = GeometryToGSerialized(in_g, tspatial_srid(t)); + if (MEOS_FLAGS_GET_GEODETIC(t->flags)) { + GSERIALIZED *gs_geog = geom_to_geog(gs); + free(gs); gs = gs_geog; + } + int r = econtains_geo_tcbuffer(gs, t); + free(t); free(gs); + if (r < 0) { mask.SetInvalid(idx); return false; } + return r != 0; + }); +} + static void Gen_econtains_tcbuffer_cbuffer(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1597,6 +1706,19 @@ static void Gen_econtains_tcbuffer_geo(DataChunk &args, ExpressionState &, Vecto }); } +static void Gen_econtains_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t1 = BlobToTemporal(in1); + Temporal *t2 = BlobToTemporal(in2); + int32_t r = econtains_tcbuffer_tcbuffer(t1, t2); + free(t1); free(t2); + if (r < 0) { mask.SetInvalid(idx); return bool(); } + return (r != 0); + }); +} + static void Gen_ecovers_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1644,6 +1766,36 @@ static void Gen_ecovers_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector }); } +static void Gen_ecovers_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t1 = BlobToTemporal(in1); + Temporal *t2 = BlobToTemporal(in2); + int32_t r = ecovers_tcbuffer_tcbuffer(t1, t2); + free(t1); free(t2); + if (r < 0) { mask.SetInvalid(idx); return bool(); } + return (r != 0); + }); +} + +static void Gen_edisjoint_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in_g, string_t in_t, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t = BlobToTemporal(in_t); + GSERIALIZED *gs = GeometryToGSerialized(in_g, tspatial_srid(t)); + if (MEOS_FLAGS_GET_GEODETIC(t->flags)) { + GSERIALIZED *gs_geog = geom_to_geog(gs); + free(gs); gs = gs_geog; + } + int r = edisjoint_geo_tcbuffer(gs, t); + free(t); free(gs); + if (r < 0) { mask.SetInvalid(idx); return false; } + return r != 0; + }); +} + static void Gen_edisjoint_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1687,6 +1839,23 @@ static void Gen_edisjoint_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, }); } +static void Gen_edwithin_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), + [&](string_t in_g, string_t in_t, double d, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t = BlobToTemporal(in_t); + GSERIALIZED *gs = GeometryToGSerialized(in_g, tspatial_srid(t)); + if (MEOS_FLAGS_GET_GEODETIC(t->flags)) { + GSERIALIZED *gs_geog = geom_to_geog(gs); + free(gs); gs = gs_geog; + } + int r = edwithin_geo_tcbuffer(gs, t, d); + free(t); free(gs); + if (r < 0) { mask.SetInvalid(idx); return false; } + return r != 0; + }); +} + static void Gen_edwithin_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); TernaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], args.data[2], result, args.size(), @@ -1717,6 +1886,23 @@ static void Gen_edwithin_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, V }); } +static void Gen_eintersects_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in_g, string_t in_t, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t = BlobToTemporal(in_t); + GSERIALIZED *gs = GeometryToGSerialized(in_g, tspatial_srid(t)); + if (MEOS_FLAGS_GET_GEODETIC(t->flags)) { + GSERIALIZED *gs_geog = geom_to_geog(gs); + free(gs); gs = gs_geog; + } + int r = eintersects_geo_tcbuffer(gs, t); + free(t); free(gs); + if (r < 0) { mask.SetInvalid(idx); return false; } + return r != 0; + }); +} + static void Gen_eintersects_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1760,6 +1946,23 @@ static void Gen_eintersects_tcbuffer_tcbuffer(DataChunk &args, ExpressionState & }); } +static void Gen_etouches_geo_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in_g, string_t in_t, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t = BlobToTemporal(in_t); + GSERIALIZED *gs = GeometryToGSerialized(in_g, tspatial_srid(t)); + if (MEOS_FLAGS_GET_GEODETIC(t->flags)) { + GSERIALIZED *gs_geog = geom_to_geog(gs); + free(gs); gs = gs_geog; + } + int r = etouches_geo_tcbuffer(gs, t); + free(t); free(gs); + if (r < 0) { mask.SetInvalid(idx); return false; } + return r != 0; + }); +} + static void Gen_etouches_tcbuffer_geo(DataChunk &args, ExpressionState &, Vector &result) { EnsureMeosThreadInitialized(); BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), @@ -1790,6 +1993,19 @@ static void Gen_etouches_tcbuffer_cbuffer(DataChunk &args, ExpressionState &, Ve }); } +static void Gen_etouches_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), + [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { + Temporal *t1 = BlobToTemporal(in1); + Temporal *t2 = BlobToTemporal(in2); + int32_t r = etouches_tcbuffer_tcbuffer(t1, t2); + free(t1); free(t2); + if (r < 0) { mask.SetInvalid(idx); return bool(); } + return (r != 0); + }); +} + // ===== @ingroup meos_geo_box_inout ===== static void Gen_stbox_as_ewkb(DataChunk &args, ExpressionState &, Vector &result) { @@ -2780,34 +2996,49 @@ void RegisterGenerated_meos_cbuffer_rel_ever(ExtensionLoader &loader) { RegisterSerializedScalarFunction(loader, ScalarFunction("aContains", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_acontains_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aContains", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_acontains_tcbuffer_cbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aContains", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_acontains_tcbuffer_geo)); + RegisterSerializedScalarFunction(loader, ScalarFunction("aContains", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_acontains_tcbuffer_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aCovers", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_acovers_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aCovers", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_acovers_tcbuffer_cbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aCovers", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_acovers_tcbuffer_geo)); + RegisterSerializedScalarFunction(loader, ScalarFunction("aCovers", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_acovers_tcbuffer_tcbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("aDisjoint", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_adisjoint_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aDisjoint", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_adisjoint_tcbuffer_geo)); RegisterSerializedScalarFunction(loader, ScalarFunction("aDisjoint", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_adisjoint_tcbuffer_cbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aDisjoint", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_adisjoint_tcbuffer_tcbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("aDwithin", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer(), LogicalType::DOUBLE}, LogicalType::BOOLEAN, Gen_adwithin_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aDwithin", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType(), LogicalType::DOUBLE}, LogicalType::BOOLEAN, Gen_adwithin_tcbuffer_geo)); RegisterSerializedScalarFunction(loader, ScalarFunction("aDwithin", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer(), LogicalType::DOUBLE}, LogicalType::BOOLEAN, Gen_adwithin_tcbuffer_tcbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("aIntersects", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_aintersects_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aIntersects", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_aintersects_tcbuffer_geo)); RegisterSerializedScalarFunction(loader, ScalarFunction("aIntersects", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_aintersects_tcbuffer_cbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aIntersects", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_aintersects_tcbuffer_tcbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("aTouches", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_atouches_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("aTouches", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_atouches_tcbuffer_geo)); RegisterSerializedScalarFunction(loader, ScalarFunction("aTouches", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_atouches_tcbuffer_cbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("aTouches", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_atouches_tcbuffer_tcbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("eContains", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_econtains_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eContains", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_econtains_tcbuffer_cbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eContains", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_econtains_tcbuffer_geo)); + RegisterSerializedScalarFunction(loader, ScalarFunction("eContains", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_econtains_tcbuffer_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eCovers", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_ecovers_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eCovers", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_ecovers_tcbuffer_cbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eCovers", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_ecovers_tcbuffer_geo)); + RegisterSerializedScalarFunction(loader, ScalarFunction("eCovers", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_ecovers_tcbuffer_tcbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("eDisjoint", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_edisjoint_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eDisjoint", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_edisjoint_tcbuffer_geo)); RegisterSerializedScalarFunction(loader, ScalarFunction("eDisjoint", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_edisjoint_tcbuffer_cbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eDisjoint", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_edisjoint_tcbuffer_tcbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("eDwithin", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer(), LogicalType::DOUBLE}, LogicalType::BOOLEAN, Gen_edwithin_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eDwithin", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType(), LogicalType::DOUBLE}, LogicalType::BOOLEAN, Gen_edwithin_tcbuffer_geo)); RegisterSerializedScalarFunction(loader, ScalarFunction("eDwithin", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer(), LogicalType::DOUBLE}, LogicalType::BOOLEAN, Gen_edwithin_tcbuffer_tcbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("eIntersects", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_eintersects_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eIntersects", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_eintersects_tcbuffer_geo)); RegisterSerializedScalarFunction(loader, ScalarFunction("eIntersects", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_eintersects_tcbuffer_cbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eIntersects", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_eintersects_tcbuffer_tcbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("eTouches", {MobilityDuckGeometryType(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_etouches_geo_tcbuffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("eTouches", {CbufferTypes::tcbuffer(), MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_etouches_tcbuffer_geo)); RegisterSerializedScalarFunction(loader, ScalarFunction("eTouches", {CbufferTypes::tcbuffer(), CbufferTypes::cbuffer()}, LogicalType::BOOLEAN, Gen_etouches_tcbuffer_cbuffer)); + RegisterSerializedScalarFunction(loader, ScalarFunction("eTouches", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_etouches_tcbuffer_tcbuffer)); } void RegisterGenerated_meos_geo_box_inout(ExtensionLoader &loader) { @@ -2934,6 +3165,7 @@ void RegisterGenerated_meos_s2cell_comp_temp(ExtensionLoader &loader) { void RegisterGenerated_meos_s2cell_conversion(ExtensionLoader &loader) { RegisterSerializedScalarFunction(loader, ScalarFunction("s2cell", {LogicalType::BIGINT}, S2cellTypes::s2cell(), Gen_bigint_to_s2cell)); + RegisterSerializedScalarFunction(loader, ScalarFunction("s2cell_recv", {LogicalType::BIGINT}, S2cellTypes::s2cell(), Gen_bigint_to_s2cell)); RegisterSerializedScalarFunction(loader, ScalarFunction("ts2cell", {TemporalTypes::tbigint()}, S2cellTypes::ts2cell(), Gen_tbigint_to_ts2cell)); RegisterSerializedScalarFunction(loader, ScalarFunction("tbigint", {S2cellTypes::ts2cell()}, TemporalTypes::tbigint(), Gen_ts2cell_to_tbigint)); RegisterSerializedScalarFunction(loader, ScalarFunction("ts2cell", {TgeogpointType::tgeogpoint(), LogicalType::INTEGER, LogicalType::BOOLEAN}, S2cellTypes::ts2cell(), Gen_tgeogpoint_to_ts2cell)); diff --git a/src/generated/generated_temporal_udfs_15.cpp b/src/generated/generated_temporal_udfs_15.cpp index 99563c02..1b837680 100644 --- a/src/generated/generated_temporal_udfs_15.cpp +++ b/src/generated/generated_temporal_udfs_15.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_2.cpp b/src/generated/generated_temporal_udfs_2.cpp index 6cd4d971..a432e8d6 100644 --- a/src/generated/generated_temporal_udfs_2.cpp +++ b/src/generated/generated_temporal_udfs_2.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_3.cpp b/src/generated/generated_temporal_udfs_3.cpp index 4e3abc5d..4c92ce81 100644 --- a/src/generated/generated_temporal_udfs_3.cpp +++ b/src/generated/generated_temporal_udfs_3.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_4.cpp b/src/generated/generated_temporal_udfs_4.cpp index d842200a..3eef36e6 100644 --- a/src/generated/generated_temporal_udfs_4.cpp +++ b/src/generated/generated_temporal_udfs_4.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } @@ -2205,7 +2190,26 @@ static void Gen_jsonbset_extract_path(DataChunk &args, ExpressionState &, Vector Set *t = BlobToSet(in); int n = 0; text **elems = ListToTextArr(child, le, &n); - Set *r = jsonbset_extract_path(t, elems, n, false, c2); + Set *r = jsonbset_extract_path(t, elems, n, c2); + free(t); FreeTextArr(elems, n); + return SetToBlobN(result, r, mask, idx); + }); +} + +static void Gen_jsonbset_extract_path_text(DataChunk &args, ExpressionState &, Vector &result) { + EnsureMeosThreadInitialized(); + auto rc = args.size(); + auto &lst = args.data[1]; lst.Flatten(rc); + auto &child = ListVector::GetEntry(lst); + child.Flatten(ListVector::GetListSize(lst)); + nullHandleType c2 = (nullHandleType) 0; + { auto &cv = args.data[2]; cv.Flatten(rc); Value v = cv.GetValue(0); if (!v.IsNull()) c2 = null_handle_type_from_string(v.ToString().c_str()); } + BinaryExecutor::ExecuteWithNulls(args.data[0], lst, result, rc, + [&](string_t in, list_entry_t le, ValidityMask &mask, idx_t idx) -> string_t { + Set *t = BlobToSet(in); + int n = 0; + text **elems = ListToTextArr(child, le, &n); + Set *r = jsonbset_extract_path_text(t, elems, n, c2); free(t); FreeTextArr(elems, n); return SetToBlobN(result, r, mask, idx); }); @@ -5181,6 +5185,7 @@ void RegisterGenerated_meos_json_set_json(ExtensionLoader &loader) { RegisterSerializedScalarFunction(loader, ScalarFunction("-", {SetTypes::jsonbset(), LogicalType::LIST(LogicalType::VARCHAR)}, SetTypes::jsonbset(), Gen_jsonbset_delete_array)); RegisterSerializedScalarFunction(loader, ScalarFunction("jsonbsetDeletePath", {SetTypes::jsonbset(), LogicalType::LIST(LogicalType::VARCHAR)}, SetTypes::jsonbset(), Gen_jsonbset_delete_path)); RegisterSerializedScalarFunction(loader, ScalarFunction("jsonbsetExtractPath", {SetTypes::jsonbset(), LogicalType::LIST(LogicalType::VARCHAR), LogicalType::VARCHAR}, SetTypes::jsonbset(), Gen_jsonbset_extract_path)); + RegisterSerializedScalarFunction(loader, ScalarFunction("jsonbsetExtractPathText", {SetTypes::jsonbset(), LogicalType::LIST(LogicalType::VARCHAR), LogicalType::VARCHAR}, SetTypes::jsonbset(), Gen_jsonbset_extract_path_text)); RegisterSerializedScalarFunction(loader, ScalarFunction("jsonbsetInsert", {SetTypes::jsonbset(), LogicalType::LIST(LogicalType::VARCHAR), TJsonbTypes::jsonb(), LogicalType::BOOLEAN}, SetTypes::jsonbset(), Gen_jsonbset_insert)); RegisterSerializedScalarFunction(loader, ScalarFunction("jsonbsetArrayLength", {SetTypes::jsonbset()}, SetTypes::intset(), Gen_jsonbset_array_length)); RegisterSerializedScalarFunction(loader, ScalarFunction("jsonbsetDeleteIndex", {SetTypes::jsonbset(), LogicalType::INTEGER}, SetTypes::jsonbset(), Gen_jsonbset_delete_index)); @@ -5223,6 +5228,7 @@ void RegisterGenerated_meos_quadbin_comp_temp(ExtensionLoader &loader) { void RegisterGenerated_meos_quadbin_conversion(ExtensionLoader &loader) { RegisterSerializedScalarFunction(loader, ScalarFunction("quadbin", {LogicalType::BIGINT}, QuadbinTypes::quadbin(), Gen_bigint_to_quadbin)); + RegisterSerializedScalarFunction(loader, ScalarFunction("quadbin_recv", {LogicalType::BIGINT}, QuadbinTypes::quadbin(), Gen_bigint_to_quadbin)); RegisterSerializedScalarFunction(loader, ScalarFunction("tquadbin", {TemporalTypes::tbigint()}, QuadbinTypes::tquadbin(), Gen_tbigint_to_tquadbin)); RegisterSerializedScalarFunction(loader, ScalarFunction("tbigint", {QuadbinTypes::tquadbin()}, TemporalTypes::tbigint(), Gen_tquadbin_to_tbigint)); RegisterSerializedScalarFunction(loader, ScalarFunction("tquadbin", {TgeogpointType::tgeogpoint(), LogicalType::INTEGER, LogicalType::BOOLEAN}, QuadbinTypes::tquadbin(), Gen_tgeogpoint_to_tquadbin)); diff --git a/src/generated/generated_temporal_udfs_5.cpp b/src/generated/generated_temporal_udfs_5.cpp index 0167725f..9f14d10d 100644 --- a/src/generated/generated_temporal_udfs_5.cpp +++ b/src/generated/generated_temporal_udfs_5.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_6.cpp b/src/generated/generated_temporal_udfs_6.cpp index aaca3a30..c862de91 100644 --- a/src/generated/generated_temporal_udfs_6.cpp +++ b/src/generated/generated_temporal_udfs_6.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } @@ -2523,71 +2508,6 @@ static void Gen_adisjoint_tgeoarr_tgeoarr(DataChunk &args, ExpressionState &, Ve if (row_count == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } -static void Gen_acontains_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { - EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { - Temporal *t1 = BlobToTemporal(in1); - Temporal *t2 = BlobToTemporal(in2); - int32_t r = acontains_tcbuffer_tcbuffer(t1, t2); - free(t1); free(t2); - if (r < 0) { mask.SetInvalid(idx); return bool(); } - return (r != 0); - }); -} - -static void Gen_acovers_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { - EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { - Temporal *t1 = BlobToTemporal(in1); - Temporal *t2 = BlobToTemporal(in2); - int32_t r = acovers_tcbuffer_tcbuffer(t1, t2); - free(t1); free(t2); - if (r < 0) { mask.SetInvalid(idx); return bool(); } - return (r != 0); - }); -} - -static void Gen_econtains_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { - EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { - Temporal *t1 = BlobToTemporal(in1); - Temporal *t2 = BlobToTemporal(in2); - int32_t r = econtains_tcbuffer_tcbuffer(t1, t2); - free(t1); free(t2); - if (r < 0) { mask.SetInvalid(idx); return bool(); } - return (r != 0); - }); -} - -static void Gen_ecovers_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { - EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { - Temporal *t1 = BlobToTemporal(in1); - Temporal *t2 = BlobToTemporal(in2); - int32_t r = ecovers_tcbuffer_tcbuffer(t1, t2); - free(t1); free(t2); - if (r < 0) { mask.SetInvalid(idx); return bool(); } - return (r != 0); - }); -} - -static void Gen_etouches_tcbuffer_tcbuffer(DataChunk &args, ExpressionState &, Vector &result) { - EnsureMeosThreadInitialized(); - BinaryExecutor::ExecuteWithNulls(args.data[0], args.data[1], result, args.size(), - [&](string_t in1, string_t in2, ValidityMask &mask, idx_t idx) -> bool { - Temporal *t1 = BlobToTemporal(in1); - Temporal *t2 = BlobToTemporal(in2); - int32_t r = etouches_tcbuffer_tcbuffer(t1, t2); - free(t1); free(t2); - if (r < 0) { mask.SetInvalid(idx); return bool(); } - return (r != 0); - }); -} - // ===== @ingroup meos_geo_transf ===== struct Unnest_tgeo_unnestState : public LocalTableFunctionState { @@ -4435,11 +4355,6 @@ void RegisterGenerated_meos_geo_rel_ever(ExtensionLoader &loader) { RegisterSerializedScalarFunction(loader, ScalarFunction("aDisjointPairs", {LogicalType::LIST(TgeogpointType::tgeogpoint()), LogicalType::LIST(TgeogpointType::tgeogpoint())}, LogicalType::LIST(LogicalType::STRUCT({{"i", LogicalType::INTEGER}, {"j", LogicalType::INTEGER}})), Gen_adisjoint_tgeoarr_tgeoarr)); RegisterSerializedScalarFunction(loader, ScalarFunction("aDisjointPairs", {LogicalType::LIST(TGeometryTypes::tgeometry()), LogicalType::LIST(TGeometryTypes::tgeometry())}, LogicalType::LIST(LogicalType::STRUCT({{"i", LogicalType::INTEGER}, {"j", LogicalType::INTEGER}})), Gen_adisjoint_tgeoarr_tgeoarr)); RegisterSerializedScalarFunction(loader, ScalarFunction("aDisjointPairs", {LogicalType::LIST(TGeographyTypes::tgeography()), LogicalType::LIST(TGeographyTypes::tgeography())}, LogicalType::LIST(LogicalType::STRUCT({{"i", LogicalType::INTEGER}, {"j", LogicalType::INTEGER}})), Gen_adisjoint_tgeoarr_tgeoarr)); - RegisterSerializedScalarFunction(loader, ScalarFunction("aContains", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_acontains_tcbuffer_tcbuffer)); - RegisterSerializedScalarFunction(loader, ScalarFunction("aCovers", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_acovers_tcbuffer_tcbuffer)); - RegisterSerializedScalarFunction(loader, ScalarFunction("eContains", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_econtains_tcbuffer_tcbuffer)); - RegisterSerializedScalarFunction(loader, ScalarFunction("eCovers", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_ecovers_tcbuffer_tcbuffer)); - RegisterSerializedScalarFunction(loader, ScalarFunction("eTouches", {CbufferTypes::tcbuffer(), CbufferTypes::tcbuffer()}, LogicalType::BOOLEAN, Gen_etouches_tcbuffer_tcbuffer)); } void RegisterGenerated_meos_geo_transf(ExtensionLoader &loader) { diff --git a/src/generated/generated_temporal_udfs_7.cpp b/src/generated/generated_temporal_udfs_7.cpp index 079cb67b..27154a08 100644 --- a/src/generated/generated_temporal_udfs_7.cpp +++ b/src/generated/generated_temporal_udfs_7.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/src/generated/generated_temporal_udfs_8.cpp b/src/generated/generated_temporal_udfs_8.cpp index 4537d1c6..8a132d05 100644 --- a/src/generated/generated_temporal_udfs_8.cpp +++ b/src/generated/generated_temporal_udfs_8.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } @@ -1427,6 +1412,31 @@ static void Gen_geom_convex_hull(DataChunk &args, ExpressionState &state, Vector if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } +static void Gen_geom_difference2d(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 2; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + GSERIALIZED *x0 = GeometryToGSerialized(in0[i], 0); + GSERIALIZED *p1 = GeometryToGSerialized(in1[i], 0); + GSERIALIZED *r = geom_difference2d(x0, p1); + free(p1); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = GSerializedToGeometry(r, state, result); + free(r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + static void Gen_geom_is_simple(DataChunk &args, ExpressionState &state, Vector &result) { EnsureMeosThreadInitialized(); const idx_t rows = args.size(); @@ -1447,6 +1457,31 @@ static void Gen_geom_is_simple(DataChunk &args, ExpressionState &state, Vector & if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } +static void Gen_geom_intersection2d(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 2; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + GSERIALIZED *x0 = GeometryToGSerialized(in0[i], 0); + GSERIALIZED *p1 = GeometryToGSerialized(in1[i], 0); + GSERIALIZED *r = geom_intersection2d(x0, p1); + free(p1); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = GSerializedToGeometry(r, state, result); + free(r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + static void Gen_geom_oriented_envelope(DataChunk &args, ExpressionState &state, Vector &result) { EnsureMeosThreadInitialized(); const idx_t rows = args.size(); @@ -1469,6 +1504,56 @@ static void Gen_geom_oriented_envelope(DataChunk &args, ExpressionState &state, if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); } +static void Gen_geom_symdifference2d(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 2; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + GSERIALIZED *x0 = GeometryToGSerialized(in0[i], 0); + GSERIALIZED *p1 = GeometryToGSerialized(in1[i], 0); + GSERIALIZED *r = geom_symdifference2d(x0, p1); + free(p1); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = GSerializedToGeometry(r, state, result); + free(r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + +static void Gen_geom_union2d(DataChunk &args, ExpressionState &state, Vector &result) { + EnsureMeosThreadInitialized(); + const idx_t rows = args.size(); + for (idx_t c = 0; c < 2; c++) args.data[c].Flatten(rows); + auto in0 = FlatVector::GetData(args.data[0]); + auto in1 = FlatVector::GetData(args.data[1]); + auto out = FlatVector::GetData(result); + auto &outv = FlatVector::Validity(result); + for (idx_t i = 0; i < rows; i++) { + bool valid = true; + for (idx_t c = 0; c < 2; c++) + if (!FlatVector::Validity(args.data[c]).RowIsValid(i)) { valid = false; break; } + if (!valid) { outv.SetInvalid(i); continue; } + GSERIALIZED *x0 = GeometryToGSerialized(in0[i], 0); + GSERIALIZED *p1 = GeometryToGSerialized(in1[i], 0); + GSERIALIZED *r = geom_union2d(x0, p1); + free(p1); + free(x0); + if (!r) { outv.SetInvalid(i); continue; } + out[i] = GSerializedToGeometry(r, state, result); + free(r); + } + if (rows == 1) result.SetVectorType(VectorType::CONSTANT_VECTOR); +} + static void Gen_line_interpolate_point_repeat(DataChunk &args, ExpressionState &state, Vector &result) { EnsureMeosThreadInitialized(); const idx_t rows = args.size(); @@ -4559,8 +4644,12 @@ void RegisterGenerated_meos_geo_base_spatial(ExtensionLoader &loader) { RegisterSerializedScalarFunction(loader, ScalarFunction("boundary", {MobilityDuckGeometryType()}, MobilityDuckGeometryType(), Gen_geom_boundary)); RegisterSerializedScalarFunction(loader, ScalarFunction("buffer", {MobilityDuckGeometryType(), LogicalType::DOUBLE, LogicalType::VARCHAR}, MobilityDuckGeometryType(), Gen_geom_buffer)); RegisterSerializedScalarFunction(loader, ScalarFunction("convexHull", {MobilityDuckGeometryType()}, MobilityDuckGeometryType(), Gen_geom_convex_hull)); + RegisterSerializedScalarFunction(loader, ScalarFunction("difference", {MobilityDuckGeometryType(), MobilityDuckGeometryType()}, MobilityDuckGeometryType(), Gen_geom_difference2d)); RegisterSerializedScalarFunction(loader, ScalarFunction("isSimple", {MobilityDuckGeometryType()}, LogicalType::BOOLEAN, Gen_geom_is_simple)); + RegisterSerializedScalarFunction(loader, ScalarFunction("intersection", {MobilityDuckGeometryType(), MobilityDuckGeometryType()}, MobilityDuckGeometryType(), Gen_geom_intersection2d)); RegisterSerializedScalarFunction(loader, ScalarFunction("orientedEnvelope", {MobilityDuckGeometryType()}, MobilityDuckGeometryType(), Gen_geom_oriented_envelope)); + RegisterSerializedScalarFunction(loader, ScalarFunction("symDifference", {MobilityDuckGeometryType(), MobilityDuckGeometryType()}, MobilityDuckGeometryType(), Gen_geom_symdifference2d)); + RegisterSerializedScalarFunction(loader, ScalarFunction("geoUnion", {MobilityDuckGeometryType(), MobilityDuckGeometryType()}, MobilityDuckGeometryType(), Gen_geom_union2d)); RegisterSerializedScalarFunction(loader, ScalarFunction("lineInterpolatePoint", {MobilityDuckGeometryType(), LogicalType::DOUBLE}, MobilityDuckGeometryType(), Gen_line_interpolate_point_repeat)); RegisterSerializedScalarFunction(loader, ScalarFunction("lineLocatePoint", {MobilityDuckGeometryType(), MobilityDuckGeometryType()}, LogicalType::DOUBLE, Gen_line_locate_point)); RegisterSerializedScalarFunction(loader, ScalarFunction("lineSubstring", {MobilityDuckGeometryType(), LogicalType::DOUBLE, LogicalType::DOUBLE}, MobilityDuckGeometryType(), Gen_line_substring)); diff --git a/src/generated/generated_temporal_udfs_9.cpp b/src/generated/generated_temporal_udfs_9.cpp index c748242b..d3db801c 100644 --- a/src/generated/generated_temporal_udfs_9.cpp +++ b/src/generated/generated_temporal_udfs_9.cpp @@ -955,44 +955,38 @@ inline Temporal * tgeo_scale_geo_sorigin(const Temporal * p0, const GSERIALIZED inline Temporal * tgeo_translate_deltaz(const Temporal * p0, double p1, double p2) { return ::tgeo_translate(p0, p1, p2, 0); } -inline STBox * tgeo_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::tgeo_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * tgeo_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::tgeo_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * tgeo_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::tgeo_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * tgeo_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::tgeo_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline STBox * stbox_get_space_tile_ysize_zsize(const GSERIALIZED * p0, double p1, const GSERIALIZED * p2) { return ::stbox_get_space_tile(p0, p1, 0, 0, p2); } inline STBox * stbox_get_space_tile_zsize(const GSERIALIZED * p0, double p1, double p2, const GSERIALIZED * p3) { return ::stbox_get_space_tile(p0, p1, p2, 0, p3); } -inline STBox * stbox_space_time_tiles_border_inc_torigin(const STBox * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::stbox_space_time_tiles(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, p6); -} inline STBox * stbox_time_tiles_border_inc_torigin(const STBox * p0, const MeosInterval * p1, int * p2) { return ::stbox_time_tiles(p0, p1, timestamptz_in("2000-01-03", -1), true, p2); } -inline Temporal ** tgeo_space_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, GSERIALIZED *** p5, int * p6) { - return ::tgeo_space_split(p0, p1, p2, p3, p4, true, true, p5, p6); +inline char * cbufferset_out_maxdd(const Set * p0) { + return ::cbufferset_out(p0, 15); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, GSERIALIZED *** p7, TimestampTz ** p8, int * p9) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, p6, true, true, p7, p8, p9); +inline Temporal * concat_tjsonb_jsonb_invert_invert_no(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, false); } -inline Temporal ** tgeo_space_time_split_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, GSERIALIZED *** p6, TimestampTz ** p7, int * p8) { - return ::tgeo_space_time_split(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6, p7, p8); +inline Temporal * concat_tjsonb_jsonb_invert_invert(const Temporal * p0, const Jsonb * p1) { + return ::concat_tjsonb_jsonb(p0, p1, true); } -inline char * cbufferset_out_maxdd(const Set * p0) { - return ::cbufferset_out(p0, 15); +inline Temporal * tjsonb_to_tfloat_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tfloat(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeogpoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeogpoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); +} +inline Temporal * tjsonb_to_tgeompoint_interp_null_handle(const Temporal * p0, const char * p1) { + return ::tjsonb_to_tgeompoint(p0, p1, interptype_from_string("linear"), null_handle_type_from_string("raise_exception")); } inline char * npointset_out_maxdd(const Set * p0) { return ::npointset_out(p0, 15); @@ -1012,21 +1006,12 @@ inline char * posechainset_out_maxdd(const Set * p0) { inline BandStats * raster_summary_stats_band_exclude_nodata(const Raster * p0) { return ::raster_summary_stats(p0, 1, true); } -inline STBox * trgeometry_space_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const GSERIALIZED * p4, int * p5) { - return ::trgeometry_space_boxes(p0, p1, p2, p3, p4, true, true, p5); -} inline STBox * trgeometry_time_boxes_bitmatrix_border_inc(const Temporal * p0, const MeosInterval * p1, TimestampTz p2, int * p3) { return ::trgeometry_time_boxes(p0, p1, p2, true, true, p3); } inline STBox * trgeometry_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, const MeosInterval * p1, int * p2) { return ::trgeometry_time_boxes(p0, p1, timestamptz_in("2000-01-03", -1), true, true, p2); } -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, TimestampTz p6, int * p7) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, p6, true, true, p7); -} -inline STBox * trgeometry_space_time_boxes_bitmatrix_border_inc_torigin(const Temporal * p0, double p1, double p2, double p3, const MeosInterval * p4, const GSERIALIZED * p5, int * p6) { - return ::trgeometry_space_time_boxes(p0, p1, p2, p3, p4, p5, timestamptz_in("2000-01-03", -1), true, true, p6); -} inline Temporal * trgeometry_append_tinstant_expand_interp_maxdist_maxt(Temporal * p0, const Temporal * p1) { return ::trgeometry_append_tinstant(p0, (const TInstant *) p1, LINEAR, 0.0, NULL, false); } diff --git a/test/sql/parity/027_tjsonb.test b/test/sql/parity/027_tjsonb.test index 34cc1430..ea6e969d 100644 --- a/test/sql/parity/027_tjsonb.test +++ b/test/sql/parity/027_tjsonb.test @@ -170,6 +170,44 @@ SELECT tjsonbPathQueryFirst(TJSONB('"{\"a\":{\"b\":7}}"@2000-01-01'), '$.a.b'::j ---- "7"@2000-01-01 00:00:00+01 "[7]"@2000-01-01 00:00:00+01 +# Each path function has a Tz twin, one C function binding tz, and a three-argument form +# whose silent flag takes its SQL default. +query III +SELECT tjsonbPathMatch(TJSONB('"{\"a\":1}"@2000-01-01'), '$.a == 1'::jsonpath, '{}'::jsonb)::VARCHAR, + tjsonbPathMatchTz(TJSONB('"{\"a\":1}"@2000-01-01'), '$.a == 2'::jsonpath, '{}'::jsonb)::VARCHAR, + tjsonbPathExistsTz(TJSONB('"{\"a\":1}"@2000-01-01'), '$.a'::jsonpath, '{}'::jsonb, false)::VARCHAR; +---- +t@2000-01-01 00:00:00+01 f@2000-01-01 00:00:00+01 t@2000-01-01 00:00:00+01 + +# The key forms without a mode use_json_null, the mode their SQL default names; ->> is the +# operator of tjsonbObjectFieldText. +query III +SELECT tjsonbObjectField(TJSONB('"{\"a\":1}"@2000-01-01'), 'a')::VARCHAR + = tjsonbObjectField(TJSONB('"{\"a\":1}"@2000-01-01'), 'a', 'use_json_null')::VARCHAR, + (TJSONB('"{\"a\":1}"@2000-01-01') ->> 'a')::VARCHAR + = tjsonbObjectFieldText(TJSONB('"{\"a\":1}"@2000-01-01'), 'a', 'use_json_null')::VARCHAR, + tjsonObjectField(ttext '"{\"a\":1}"@2000-01-01', 'a')::VARCHAR; +---- +true true "1"@2000-01-01 00:00:00+01 + +# tjsonbContained(a, b) answers tjsonbContains(b, a): one object holding the other answers +# true in one order and false in the other. +query IIII +SELECT tjsonbContained(TJSONB('"{\"a\":1}"@2000-01-01'), TJSONB('"{\"a\":1,\"b\":2}"@2000-01-01'))::VARCHAR, + tjsonbContains(TJSONB('"{\"a\":1}"@2000-01-01'), TJSONB('"{\"a\":1,\"b\":2}"@2000-01-01'))::VARCHAR, + tjsonbContained('{"a":1}'::jsonb, TJSONB('"{\"a\":1,\"b\":2}"@2000-01-01'))::VARCHAR, + tjsonbContains('{"a":1}'::jsonb, TJSONB('"{\"a\":1,\"b\":2}"@2000-01-01'))::VARCHAR; +---- +t@2000-01-01 00:00:00+01 f@2000-01-01 00:00:00+01 t@2000-01-01 00:00:00+01 f@2000-01-01 00:00:00+01 + +# The concatenation of a JSONB value and a temporal one keeps the order of its operands. +query II +SELECT tConcat('[0]'::jsonb, TJSONB('"[1]"@2000-01-01'))::VARCHAR, + ('[0]'::jsonb || TJSONB('"[1]"@2000-01-01'))::VARCHAR + = tConcat(TJSONB('"[1]"@2000-01-01'), '[0]'::jsonb)::VARCHAR; +---- +"[0, 1]"@2000-01-01 00:00:00+01 false + # Insert takes the path as a list and the new value as jsonb. The last argument chooses # which side of an existing element the value lands on, so a path naming a key the object # does not hold creates it whichever way the flag reads. diff --git a/tools/codegen_duck_udfs.py b/tools/codegen_duck_udfs.py index 6d8c9d23..a0ee312a 100644 --- a/tools/codegen_duck_udfs.py +++ b/tools/codegen_duck_udfs.py @@ -841,12 +841,14 @@ def sig_declared_accs(f): return [SIG_TEMPORAL_ACC[t] for t in SIG_TEMPORAL_ACC if t in have] or None def sig_tt_pairs(f): - """[(first accessor, second accessor, declared temporal return accessor or None, commuted)] - for each signature the catalog declares over two temporal operands, as #container_scalar_sigs - reads them for a container pair. A pair of two types (tDistance(trgeometry, tgeompoint)) - cannot be read off one scope type, and both C parameters are `Temporal *`, so the commuted - pair (tDistance(tgeompoint, trgeometry)) states its order through sqlArgParams, the C - parameters in SQL order, reversed against the kernel's own.""" + """[(first accessor, second accessor, declared temporal return accessor or None, commuted, + SQL name)] for each signature the catalog declares over two temporal operands, as + #container_scalar_sigs reads them for a container pair. A pair of two types + (tDistance(trgeometry, tgeompoint)) cannot be read off one scope type, and both C parameters + are `Temporal *`, so the commuted pair (tDistance(tgeompoint, trgeometry)) states its order + through sqlArgParams, the C parameters in SQL order, reversed against the kernel's own. The + name is the one the signature declares: contains_tjsonb_tjsonb answers + tjsonbContains(tjsonb, tjsonb) and, its operands swapped, tjsonbContained(tjsonb, tjsonb).""" ins, _out = classify(f) cnames = [p.get("name") for p in ins] out = [] @@ -856,7 +858,7 @@ def sig_tt_pairs(f): continue rev = s.get("sqlArgParams") == cnames[::-1] out.append((SIG_TEMPORAL_ACC[a[0]], SIG_TEMPORAL_ACC[a[1]], - SIG_TEMPORAL_ACC.get(s.get("ret")), rev)) + SIG_TEMPORAL_ACC.get(s.get("ret")), rev, s.get("sqlName") or f["sqlfn"])) return out def sig_commuted_accs(f): @@ -873,6 +875,19 @@ def sig_commuted_accs(f): and s["args"][1] in SIG_TEMPORAL_ACC} return [SIG_TEMPORAL_ACC[t] for t in SIG_TEMPORAL_ACC if t in have] +def sig_only_commuted(f, acc): + """True when every two-argument signature over the temporal type of accessor `acc` declares + the commuted order, and one does, read as #sig_commuted_accs reads that order: the form of + concat_tjsonb_jsonb binding invert to INVERT answers tConcat(jsonb, tjsonb) alone, so its + kernel's own order registers nothing.""" + ins, _out = classify(f) + cnames = [p.get("name") for p in ins] + if len(cnames) != 2: + return False + over = [s for s in f.get("sqlSignatures") or [] + if len(s.get("args") or []) == 2 and any(SIG_TEMPORAL_ACC.get(x) == acc for x in s["args"])] + return bool(over) and all(s.get("sqlArgParams") == cnames[::-1] for s in over) + def sig_geo_first(f): """Which operand a geometry-and-temporal function takes FIRST **in SQL**, read from the catalog's `sqlSignatures`: True geometry-first, False temporal-first, None when the declared @@ -1274,11 +1289,19 @@ def project_signature_forms(f): sqlfn = kept_names.pop() if len(kept_names) == 1 else f["sqlfn"] out = [dict(f, sqlSignatures=keep, sqlfn=sqlfn)] if keep else [] names = Counter("_".join(k for k, _v in key) for key in forms) + # every form is checked before any is recorded: a form left in FN_BY_NAME by a projection + # that then answers [f] claims the signatures f keeps (tjsonbPathExists, whose jsonb default + # '{}' no literal forwards), and a signature two public functions claim registers nothing + allits = {} for key, fsigs in forms.items(): fixed = dict(key) lits = {p["name"]: forward_literal(p, fixed[p["name"]]) for p in params if p["name"] in fixed} if None in lits.values() or len({s["sqlName"] for s in fsigs}) != 1: return [f] + allits[key] = lits + for key, fsigs in forms.items(): + fixed = dict(key) + lits = allits[key] suffix = "_".join(k for k, _v in key) if names[suffix] > 1: suffix = "_".join("%s_%s" % (k, re.sub(r"\W", "", str(v)).lower()) for k, v in key) @@ -5343,6 +5366,10 @@ def emit_container_scalar(f, ops, rev): # set, a span or a span set, and the sequence constructors over an array "meos_temporal_constructor", "meos_geo_constructor", "meos_json_constructor", "meos_pointcloud_constructor", + # The functions of the temporal JSON values, each the computation of one + # operation (tjsonbObjectField, tjsonbPathExists and tjsonbPathExistsTz over one C + # function binding its tz), called as the catalog places their arguments + "meos_json_json", # The temporal I/O: FromText, FromEWKT, FromMFJSON, FromBinary, FromEWKB, # FromHexEWKB, FromHexWKB and asText, asEWKT, asMFJSON, asBinary, asEWKB, # asHexEWKB, asHexWKB, one signature per type MobilityDB declares @@ -5415,7 +5442,9 @@ def emit_container_scalar(f, ops, rev): # raquet(bytea, integer, integer, quadbin, text, float) is not among them, its name being answered # by raquet(text): raquet_make takes `has_nodata`, which its wrapper sets from whether the nodata # argument is NULL and which the catalog states no binding for, so src/raster/raquet.cpp keeps it. -RETIRE_UNCOVERED_OK = {"unnest", "box2d", "box3d", "stboxX", +# tjsonbSet and tjsonbSetLax register nothing: tjsonb_set reads its keys as a text ** and a count +# no marshalling fills from a text[], and tjsonbSet binds no literal for handle_null. +RETIRE_UNCOVERED_OK = {"unnest", "box2d", "box3d", "stboxX", "tjsonbSet", "spaceSplit", "spaceTimeSplit", "timeSplit", "valueSplit", "valueTimeSplit", "asMVTGeom", "clusterKMeans", "clusterDBSCAN", "clusterIntersecting", "clusterWithin", @@ -6389,7 +6418,10 @@ def sig_call_arg(f, p, t, k, arrays, lenp): pre=["Temporal *p%d = BlobToTemporal(%s);" % (k, v)], post=["free(p%d);" % k], cexpr={p["name"]: "p%d" % k}) if n.count("*") == 1 and b in PTR_IN: - acc = BASE_LOGICAL.get(t) or SQL_BASE_TO_DUCK.get(t) or SET_SIG_ACC.get(t) + # or the SQL type the pointer's own DuckDB type is named after (jsonpath for JsonPath, + # TJsonbTypes::jsonpath()), a type no base, span or set map carries + acc = (BASE_LOGICAL.get(t) or SQL_BASE_TO_DUCK.get(t) or SET_SIG_ACC.get(t) + or (PTR_IN[b][0] if PTR_IN[b][0].endswith("::%s()" % t) else None)) if not acc or (b in BASEVAL_PTR_IN and PTR_IN[b][0] != acc): return None return dict(kind="ptr", dt=acc, cpp="string_t", @@ -6399,6 +6431,10 @@ def sig_call_arg(f, p, t, k, arrays, lenp): return dict(kind="cstr", dt="LogicalType::VARCHAR", cpp="string_t", pre=["std::string s%d = %s.GetString();" % (k, v)], post=[], cexpr={p["name"]: "s%d.c_str()" % k}) + if b == "text" and n.count("*") == 1 and t == "text": + return dict(kind="ptr", dt="LogicalType::VARCHAR", cpp="string_t", + pre=["text *p%d = MakeText(%s);" % (k, v)], post=["free(p%d);" % k], + cexpr={p["name"]: "p%d" % k}) if "*" in n: return None if b in CELL_UINT and t in CELL_SQL: @@ -6536,7 +6572,11 @@ def shape_sig_call(f): for s in f.get("sqlSignatures") or []: if re.search(r'_(out|in|send|recv)$', s.get("sqlName") or "") or sig_claims(s, f) > 1: continue - order = s.get("sqlArgParams") or shape.get("sqlArgParams") or [p["name"] for p in facing] + # the C parameters in order, but for those the signature binds to a literal (tz of + # tjsonbPathExists and tjsonbPathExistsTz, one C function under two SQL names) + sbound = s.get("boundArgs") or {} + order = (s.get("sqlArgParams") or shape.get("sqlArgParams") + or [p["name"] for p in facing if p["name"] not in sbound]) if len(order) != len(s["args"]) or any(nm not in byname for nm in order): continue bound = {} @@ -7247,10 +7287,13 @@ def gen_cpp(fns, out_path, declared=None, aliases=None): if _ttpairs and any(p[0] != p[1] or p[3] for p in _ttpairs): if any(p[3] for p in _ttpairs): bodies.append(emit_binary_tt(f, kind, rev=True)) - for a0, a1, ra, rv in _ttpairs: + for a0, a1, ra, rv, snm in _ttpairs: _r = (ra or ret_temporal_type(fn, a0, f.get("group"), f.get("sqlReturnType")) if dret == "MD_TEMPORAL" else dret) - for nm in reg_names(f, sqlfn, aliases, argsig): + # the operator is the function's: a signature under another name + # (tjsonbContained, contains_tjsonb_tjsonb over its operands swapped) takes + # that name alone, never the operator of the name it computes + for nm in (reg_names(f, snm, aliases, argsig) if snm == sqlfn else [snm]): specific_regs.append(f' RegisterSerializedScalarFunction(loader, ScalarFunction(' f'"{reg_name(nm, f)}", {{{a0}, {a1}}}, {_r}, ' f'Gen_{fn}{"_rev" if rv else ""}));') @@ -7264,6 +7307,10 @@ def gen_cpp(fns, out_path, declared=None, aliases=None): f'"{reg_name(nm, f)}", {argsig}, {rett}, Gen_{fn}));') else: for a in accs: + # a retired binary kernel declared over this type in the commuted order alone + # registers that order below (Gen__rev), never its own + if b and retired(f) and sig_only_commuted(f, a): + continue sig = spec_sig % ((a,) * spec_sig.count("%s")) # 1 or 2 accessor slots r2 = (ret_temporal_type(fn, a, f.get("group"), f.get("sqlReturnType")) if dret == "MD_TEMPORAL" else ret_set_type(fn, a) if dret == "MD_SET" else dret) diff --git a/vcpkg_ports/meos/portfile.cmake b/vcpkg_ports/meos/portfile.cmake index d396c10b..cfcae056 100644 --- a/vcpkg_ports/meos/portfile.cmake +++ b/vcpkg_ports/meos/portfile.cmake @@ -14,7 +14,7 @@ # libmeos recompile per build) and makes two runs of the same commit build different # sources. A recorded SHA keeps builds reproducible and the cache warm between # advances. -set(_MEOS_REF "ce124289e686bacb74ad095e16b6b0963a2eeb15") +set(_MEOS_REF "3c25b6966fbdc709bee672e7630f5d7557b2cd7d") message(STATUS "MEOS port: building MobilityDB at recorded ${_MEOS_REF}") # FETCH_REF names the branch (always advertised) so the fetch works even when the