> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-3a82795f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> RowBinaryWithDefaultsフォーマットに関するドキュメント

# RowBinaryWithDefaults

| 入力 | 出力 | エイリアス |
| -- | -- | ----- |
| ✔  | ✗  |       |

<div id="description">
  ## 説明
</div>

[`RowBinary`](/ja/reference/formats/RowBinary/RowBinary)フォーマットに似ていますが、各カラムの前に、デフォルト値を使用するかどうかを示す追加の1バイトがあります。

<div id="example-usage">
  ## 使用例
</div>

例:

```sql title="Query" theme={null}
SELECT * FROM FORMAT('RowBinaryWithDefaults', 'x UInt32 default 42, y UInt32', x'010001000000')
```

```response title="Response" theme={null}
┌──x─┬─y─┐
│ 42 │ 1 │
└────┴───┘
```

* カラム `x` では、デフォルト値を使用することを示す 1 バイト `01` のみがあり、このバイトの後ろにはほかのデータはありません。
* カラム `y` では、データはバイト `00` で始まり、これはそのカラムが実際の値を持ち、後続のデータ \`01000000\`\` から読み取る必要があることを示します。

<div id="format-settings">
  ## フォーマット設定
</div>

以下の設定は、すべての `RowBinary` 系フォーマットに共通です。

| 設定                                                                                                                                       | 説明                                                                                                                                                                                                                 | デフォルト   |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| [`format_binary_max_string_size`](/ja/reference/settings/formats#format_binary_max_string_size)                                          | RowBinary フォーマットで許可される String の最大サイズです。                                                                                                                                                                            | `1GiB`  |
| [`output_format_binary_encode_types_in_binary_format`](/ja/reference/settings/formats#input_format_binary_decode_types_in_binary_format) | [`RowBinaryWithNamesAndTypes`](/ja/reference/formats/RowBinary/RowBinaryWithNamesAndTypes) 出力フォーマットで、ヘッダー内の型を、型名の文字列ではなく [`binary encoding`](/ja/reference/data-types/data-types-binary-encoding) を使って書き込めるようにします。 | `false` |
| [`input_format_binary_decode_types_in_binary_format`](/ja/reference/settings/formats#input_format_binary_decode_types_in_binary_format)  | [`RowBinaryWithNamesAndTypes`](/ja/reference/formats/RowBinary/RowBinaryWithNamesAndTypes) 入力フォーマットで、ヘッダー内の型を、型名の文字列ではなく [`binary encoding`](/ja/reference/data-types/data-types-binary-encoding) を使って読み取れるようにします。 | `false` |
| [`output_format_binary_write_json_as_string`](/ja/reference/settings/formats#output_format_binary_write_json_as_string)                  | [`RowBinary`](/ja/reference/formats/RowBinary/RowBinary) 出力フォーマットで、[`JSON`](/ja/reference/data-types/newjson) データ型の値を `JSON` [String](/ja/reference/data-types/string) 値として書き込めるようにします。                            | `false` |
| [`input_format_binary_read_json_as_string`](/ja/reference/settings/formats#input_format_binary_read_json_as_string)                      | [`RowBinary`](/ja/reference/formats/RowBinary/RowBinary) 入力フォーマットで、[`JSON`](/ja/reference/data-types/newjson) データ型の値を `JSON` [String](/ja/reference/data-types/string) 値として読み取れるようにします。                            | `false` |
