MCPcopy Create free account
hub / github.com/apache/arrow / garrow_mode_options_class_init

Function garrow_mode_options_class_init

c_glib/arrow-glib/compute.cpp:8223–8280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8221}
8222
8223static void
8224garrow_mode_options_class_init(GArrowModeOptionsClass *klass)
8225{
8226 auto gobject_class = G_OBJECT_CLASS(klass);
8227
8228 gobject_class->set_property = garrow_mode_options_set_property;
8229 gobject_class->get_property = garrow_mode_options_get_property;
8230
8231 arrow::compute::ModeOptions options;
8232
8233 GParamSpec *spec;
8234 /**
8235 * GArrowModeOptions:n:
8236 *
8237 * Number of distinct most-common values to return.
8238 *
8239 * Since: 23.0.0
8240 */
8241 spec = g_param_spec_int64("n",
8242 "N",
8243 "Number of distinct most-common values to return",
8244 1,
8245 G_MAXINT64,
8246 options.n,
8247 static_cast<GParamFlags>(G_PARAM_READWRITE));
8248 g_object_class_install_property(gobject_class, PROP_MODE_OPTIONS_N, spec);
8249
8250 /**
8251 * GArrowModeOptions:skip-nulls:
8252 *
8253 * Whether NULLs are skipped or not.
8254 *
8255 * Since: 23.0.0
8256 */
8257 spec = g_param_spec_boolean("skip-nulls",
8258 "Skip NULLs",
8259 "Whether NULLs are skipped or not",
8260 options.skip_nulls,
8261 static_cast<GParamFlags>(G_PARAM_READWRITE));
8262 g_object_class_install_property(gobject_class, PROP_MODE_OPTIONS_SKIP_NULLS, spec);
8263
8264 /**
8265 * GArrowModeOptions:min-count:
8266 *
8267 * If less than this many non-null values are observed, emit null.
8268 *
8269 * Since: 23.0.0
8270 */
8271 spec =
8272 g_param_spec_uint("min-count",
8273 "Min count",
8274 "If less than this many non-null values are observed, emit null",
8275 0,
8276 G_MAXUINT,
8277 options.min_count,
8278 static_cast<GParamFlags>(G_PARAM_READWRITE));
8279 g_object_class_install_property(gobject_class, PROP_MODE_OPTIONS_MIN_COUNT, spec);
8280}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected