{
  "$schema": "/products/haybarn/functions/api/v1/function.schema.json",
  "schemaVersion": 1,
  "name": "bitstring_agg",
  "schema": "main",
  "slug": "bitstring_agg",
  "description": "Returns a bitstring with bits set for each distinct value.",
  "category": "aggregate",
  "kinds": [
    "aggregate"
  ],
  "aliasOf": [],
  "snapshot": {
    "schemaVersion": 1,
    "id": "duckdb-1.4.4",
    "engine": "duckdb",
    "label": "DuckDB 1.4.4",
    "engineVersion": "v1.4.4",
    "sourceId": "6ddac802ff",
    "source": "https://github.com/duckdb/duckdb/releases/tag/v1.4.4",
    "binarySha256": "8d05bee013ea13d6b5d75272d7ddb52b3d6d9cdaf30d1a3e8e82d42757905182",
    "capturedAt": "2026-09-05T18:37:36.091Z",
    "requestedExtensions": [
      "core_functions",
      "icu",
      "json",
      "parquet"
    ],
    "loadedExtensions": [
      {
        "extension_name": "autocomplete",
        "extension_version": "v1.4.4",
        "installed_from": ""
      },
      {
        "extension_name": "core_functions",
        "extension_version": "v1.4.4",
        "installed_from": ""
      },
      {
        "extension_name": "icu",
        "extension_version": "v1.4.4",
        "installed_from": ""
      },
      {
        "extension_name": "json",
        "extension_version": "v1.4.4",
        "installed_from": ""
      },
      {
        "extension_name": "parquet",
        "extension_version": "v1.4.4",
        "installed_from": ""
      },
      {
        "extension_name": "shell",
        "extension_version": "v1.4.4",
        "installed_from": ""
      }
    ],
    "scope": "Built-in functions in the main schema, with the requested extensions loaded. Catalog visibility is not a guarantee of browser support."
  },
  "links": {
    "html": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/",
    "markdown": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/index.md",
    "json": "/products/haybarn/functions/api/v1/duckdb-1.4.4/functions/bitstring_agg.json"
  },
  "interpretation": [
    "Choose a snapshot matching the target engine and build. The default is captured from the published Haybarn WASM package used by the browser playground. Historical native snapshots are also available.",
    "Availability is an observation in the recorded build and extension profile, not a guarantee of support in every installation or in WASM.",
    "Types and descriptions are declarations from duckdb_functions(). Binding can specialize result types. Null means not supplied by the catalog; do not invent defaults, optionality, argument mode, or table output columns.",
    "Raw parameter arrays preserve catalog order for scalar/aggregate/macro functions. Raw table arguments are alphabetical. Use callingConvention for engine-confirmed positional order and named arguments; null modes are unrecorded. Named does not mean optional. Macro defaults and special named variadic behavior are not supplied by duckdb_functions().",
    "Catalog examples are source material and may require data or extensions. runnableExamples contains separately verified SQL for the pinned WASM package; sample-data adaptations and guide examples are labeled separately.",
    "Guide annotations and recipes are separate editorial content. The browser runner always uses Haybarn WASM 1.5.5-rc3, independently of the documentation snapshot.",
    "All URLs beginning with / are relative to the origin hosting this document. Exports require no JavaScript, cookies, API key, or browser engine."
  ],
  "overloads": [
    {
      "id": "overload-59074a251554bd3c",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-59074a251554bd3c",
      "signature": "bitstring_agg(arg: BIGINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "BIGINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "BIGINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-4efd02fd0bb3f132",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-4efd02fd0bb3f132",
      "signature": "bitstring_agg(arg: HUGEINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "HUGEINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "HUGEINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-04daed0086f80c6e",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-04daed0086f80c6e",
      "signature": "bitstring_agg(arg: INTEGER) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "INTEGER",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "INTEGER"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-06f2e993a10d8aa7",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-06f2e993a10d8aa7",
      "signature": "bitstring_agg(arg: SMALLINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "SMALLINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "SMALLINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-b223357a76d96ac7",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-b223357a76d96ac7",
      "signature": "bitstring_agg(arg: TINYINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "TINYINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "TINYINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-25fad99f88e1797a",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-25fad99f88e1797a",
      "signature": "bitstring_agg(arg: UBIGINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "UBIGINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "UBIGINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-f5f36039c34f93e7",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-f5f36039c34f93e7",
      "signature": "bitstring_agg(arg: UHUGEINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "UHUGEINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "UHUGEINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-4788b6c0c044860c",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-4788b6c0c044860c",
      "signature": "bitstring_agg(arg: UINTEGER) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "UINTEGER",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "UINTEGER"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-5ba313a7af822946",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-5ba313a7af822946",
      "signature": "bitstring_agg(arg: USMALLINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "USMALLINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "USMALLINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-ea395c90ad3c7db5",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-ea395c90ad3c7db5",
      "signature": "bitstring_agg(arg: UTINYINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "UTINYINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg"
        ],
        "parameter_types": [
          "UTINYINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-ca634a7df54e6908",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-ca634a7df54e6908",
      "signature": "bitstring_agg(arg: BIGINT, col1: BIGINT, col2: BIGINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "BIGINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "BIGINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "BIGINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "BIGINT",
          "BIGINT",
          "BIGINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-4281973fe8704386",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-4281973fe8704386",
      "signature": "bitstring_agg(arg: HUGEINT, col1: HUGEINT, col2: HUGEINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "HUGEINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "HUGEINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "HUGEINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "HUGEINT",
          "HUGEINT",
          "HUGEINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-6f20c1003df6baad",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-6f20c1003df6baad",
      "signature": "bitstring_agg(arg: INTEGER, col1: INTEGER, col2: INTEGER) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "INTEGER",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "INTEGER",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "INTEGER",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "INTEGER",
          "INTEGER",
          "INTEGER"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-1c7e6bb5b5551ab1",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-1c7e6bb5b5551ab1",
      "signature": "bitstring_agg(arg: SMALLINT, col1: SMALLINT, col2: SMALLINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "SMALLINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "SMALLINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "SMALLINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "SMALLINT",
          "SMALLINT",
          "SMALLINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-2e6e148ca92a380e",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-2e6e148ca92a380e",
      "signature": "bitstring_agg(arg: TINYINT, col1: TINYINT, col2: TINYINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "TINYINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "TINYINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "TINYINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "TINYINT",
          "TINYINT",
          "TINYINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-4f00a755bdc737c9",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-4f00a755bdc737c9",
      "signature": "bitstring_agg(arg: UBIGINT, col1: UBIGINT, col2: UBIGINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "UBIGINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "UBIGINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "UBIGINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "UBIGINT",
          "UBIGINT",
          "UBIGINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-28826d6338f76374",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-28826d6338f76374",
      "signature": "bitstring_agg(arg: UHUGEINT, col1: UHUGEINT, col2: UHUGEINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "UHUGEINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "UHUGEINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "UHUGEINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "UHUGEINT",
          "UHUGEINT",
          "UHUGEINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-43efd674b60ed537",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-43efd674b60ed537",
      "signature": "bitstring_agg(arg: UINTEGER, col1: UINTEGER, col2: UINTEGER) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "UINTEGER",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "UINTEGER",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "UINTEGER",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "UINTEGER",
          "UINTEGER",
          "UINTEGER"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-020113c5d628ec9c",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-020113c5d628ec9c",
      "signature": "bitstring_agg(arg: USMALLINT, col1: USMALLINT, col2: USMALLINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "USMALLINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "USMALLINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "USMALLINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "USMALLINT",
          "USMALLINT",
          "USMALLINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    },
    {
      "id": "overload-cd1680584ec74467",
      "url": "/products/haybarn/functions/releases/duckdb-1.4.4/bitstring_agg/#overload-cd1680584ec74467",
      "signature": "bitstring_agg(arg: UTINYINT, col1: UTINYINT, col2: UTINYINT) → BIT",
      "parameterOrder": "catalog-order",
      "callingConvention": {
        "source": null,
        "parameters": [
          {
            "name": "arg",
            "type": "UTINYINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col1",
            "type": "UTINYINT",
            "mode": null,
            "position": null
          },
          {
            "name": "col2",
            "type": "UTINYINT",
            "mode": null,
            "position": null
          }
        ],
        "positional": null,
        "named": null,
        "variadic": null,
        "evidence": null
      },
      "syntax": {
        "kind": "function",
        "operator": null
      },
      "catalog": {
        "schema_name": "main",
        "function_name": "bitstring_agg",
        "function_type": "aggregate",
        "description": "Returns a bitstring with bits set for each distinct value.",
        "comment": null,
        "return_type": "BIT",
        "parameters": [
          "arg",
          "col1",
          "col2"
        ],
        "parameter_types": [
          "UTINYINT",
          "UTINYINT",
          "UTINYINT"
        ],
        "varargs": null,
        "macro_definition": null,
        "has_side_effects": false,
        "internal": true,
        "examples": [
          "bitstring_agg(A)"
        ],
        "stability": "CONSISTENT",
        "categories": [],
        "alias_of": null
      }
    }
  ],
  "editorial": {
    "argumentNotes": [],
    "recipes": []
  },
  "examples": [
    {
      "original": "bitstring_agg(A)",
      "sql": "SELECT bitstring_agg(A);",
      "overloadIds": [
        "overload-59074a251554bd3c",
        "overload-4efd02fd0bb3f132",
        "overload-04daed0086f80c6e",
        "overload-06f2e993a10d8aa7",
        "overload-b223357a76d96ac7",
        "overload-25fad99f88e1797a",
        "overload-f5f36039c34f93e7",
        "overload-4788b6c0c044860c",
        "overload-5ba313a7af822946",
        "overload-ea395c90ad3c7db5",
        "overload-ca634a7df54e6908",
        "overload-4281973fe8704386",
        "overload-6f20c1003df6baad",
        "overload-1c7e6bb5b5551ab1",
        "overload-2e6e148ca92a380e",
        "overload-4f00a755bdc737c9",
        "overload-28826d6338f76374",
        "overload-43efd674b60ed537",
        "overload-020113c5d628ec9c",
        "overload-cd1680584ec74467"
      ],
      "source": "engine-catalog",
      "verification": null
    }
  ],
  "translations": [],
  "runnableExamples": [
    {
      "function": "bitstring_agg",
      "original": null,
      "sql": "SELECT bitstring_agg(value, 1, 5) AS present\nFROM (VALUES (1), (3), (5)) AS data(value);",
      "source": "guide-example",
      "verification": {
        "engine": "haybarn-wasm",
        "packageVersion": "1.5.5-rc3",
        "sourceId": "105edd31b5",
        "binarySha256": "426638bc374fcc542fea93b251f885bfb7d221c68fcc0a5a81cc565d7e6ca180",
        "rowCount": 1
      }
    }
  ],
  "additionalDocumentation": [
    {
      "title": "Aggregate Functions",
      "url": "https://duckdb.org/docs/current/sql/functions/aggregates#bitstring_aggarg"
    },
    {
      "title": "Bitstring Functions",
      "url": "https://duckdb.org/docs/current/sql/functions/bitstring#bitstring_aggarg-min-max"
    }
  ],
  "availability": [
    {
      "snapshot": "haybarn-1.5.5-rc3",
      "observed": true,
      "overloadCount": 20,
      "matchingOverloadIds": [
        "overload-ca634a7df54e6908",
        "overload-59074a251554bd3c",
        "overload-4281973fe8704386",
        "overload-4efd02fd0bb3f132",
        "overload-6f20c1003df6baad",
        "overload-04daed0086f80c6e",
        "overload-1c7e6bb5b5551ab1",
        "overload-06f2e993a10d8aa7",
        "overload-2e6e148ca92a380e",
        "overload-b223357a76d96ac7",
        "overload-4f00a755bdc737c9",
        "overload-25fad99f88e1797a",
        "overload-28826d6338f76374",
        "overload-f5f36039c34f93e7",
        "overload-43efd674b60ed537",
        "overload-4788b6c0c044860c",
        "overload-020113c5d628ec9c",
        "overload-5ba313a7af822946",
        "overload-cd1680584ec74467",
        "overload-ea395c90ad3c7db5"
      ],
      "json": "/products/haybarn/functions/api/v1/haybarn-1.5.5-rc3/functions/bitstring_agg.json"
    },
    {
      "snapshot": "duckdb-1.5.5",
      "observed": true,
      "overloadCount": 20,
      "matchingOverloadIds": [
        "overload-ca634a7df54e6908",
        "overload-59074a251554bd3c",
        "overload-4281973fe8704386",
        "overload-4efd02fd0bb3f132",
        "overload-6f20c1003df6baad",
        "overload-04daed0086f80c6e",
        "overload-1c7e6bb5b5551ab1",
        "overload-06f2e993a10d8aa7",
        "overload-2e6e148ca92a380e",
        "overload-b223357a76d96ac7",
        "overload-4f00a755bdc737c9",
        "overload-25fad99f88e1797a",
        "overload-28826d6338f76374",
        "overload-f5f36039c34f93e7",
        "overload-43efd674b60ed537",
        "overload-4788b6c0c044860c",
        "overload-020113c5d628ec9c",
        "overload-5ba313a7af822946",
        "overload-cd1680584ec74467",
        "overload-ea395c90ad3c7db5"
      ],
      "json": "/products/haybarn/functions/api/v1/duckdb-1.5.5/functions/bitstring_agg.json"
    },
    {
      "snapshot": "duckdb-1.4.4",
      "observed": true,
      "overloadCount": 20,
      "matchingOverloadIds": [
        "overload-ca634a7df54e6908",
        "overload-59074a251554bd3c",
        "overload-4281973fe8704386",
        "overload-4efd02fd0bb3f132",
        "overload-6f20c1003df6baad",
        "overload-04daed0086f80c6e",
        "overload-1c7e6bb5b5551ab1",
        "overload-06f2e993a10d8aa7",
        "overload-2e6e148ca92a380e",
        "overload-b223357a76d96ac7",
        "overload-4f00a755bdc737c9",
        "overload-25fad99f88e1797a",
        "overload-28826d6338f76374",
        "overload-f5f36039c34f93e7",
        "overload-43efd674b60ed537",
        "overload-4788b6c0c044860c",
        "overload-020113c5d628ec9c",
        "overload-5ba313a7af822946",
        "overload-cd1680584ec74467",
        "overload-ea395c90ad3c7db5"
      ],
      "json": "/products/haybarn/functions/api/v1/duckdb-1.4.4/functions/bitstring_agg.json"
    },
    {
      "snapshot": "duckdb-1.3.2",
      "observed": true,
      "overloadCount": 20,
      "matchingOverloadIds": [
        "overload-ca634a7df54e6908",
        "overload-59074a251554bd3c",
        "overload-4281973fe8704386",
        "overload-4efd02fd0bb3f132",
        "overload-6f20c1003df6baad",
        "overload-04daed0086f80c6e",
        "overload-1c7e6bb5b5551ab1",
        "overload-06f2e993a10d8aa7",
        "overload-2e6e148ca92a380e",
        "overload-b223357a76d96ac7",
        "overload-4f00a755bdc737c9",
        "overload-25fad99f88e1797a",
        "overload-28826d6338f76374",
        "overload-f5f36039c34f93e7",
        "overload-43efd674b60ed537",
        "overload-4788b6c0c044860c",
        "overload-020113c5d628ec9c",
        "overload-5ba313a7af822946",
        "overload-cd1680584ec74467",
        "overload-ea395c90ad3c7db5"
      ],
      "json": "/products/haybarn/functions/api/v1/duckdb-1.3.2/functions/bitstring_agg.json"
    }
  ]
}
