> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# short_circuit_function_evaluation_* إعدادات الجلسة

> إعدادات الجلسة في ClickHouse ضمن المجموعة المُولَّدة short_circuit_function_evaluation_*.

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>النوع</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>القيمة الافتراضية</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          يمكن تغييره دون إعادة التشغيل
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

تتوفر هذه الإعدادات في [system.settings](/docs/ar/reference/system-tables/settings)، وهي مُولَّدة تلقائيًا من [المصدر](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<div id="short_circuit_function_evaluation">
  ## short\_circuit\_function\_evaluation
</div>

<SettingsInfoBlock type="ShortCircuitFunctionEvaluation" default_value="enable" />

يسمح بحساب الدوال [if](/docs/ar/reference/functions/regular-functions/conditional-functions#if) و[multiIf](/docs/ar/reference/functions/regular-functions/conditional-functions#multiIf) و[and](/docs/ar/reference/functions/regular-functions/logical-functions#and) و[or](/docs/ar/reference/functions/regular-functions/logical-functions#or) وفقًا [للتقييم المختصر](https://en.wikipedia.org/wiki/Short-circuit_evaluation). يساعد ذلك على تحسين تنفيذ التعبيرات المعقدة في هذه الدوال ومنع الاستثناءات المحتملة (مثل القسمة على صفر عندما لا يكون ذلك متوقعًا).

القيم الممكنة:

* `enable` — يفعّل التقييم المختصر للدوال المناسبة لذلك (التي قد تطرح استثناءً أو تكون كثيفة حسابيًا).
* `force_enable` — يفعّل التقييم المختصر لجميع الدوال.
* `disable` — يعطّل التقييم المختصر.

<div id="short_circuit_function_evaluation_for_nulls">
  ## short\_circuit\_function\_evaluation\_for\_nulls
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "1"},{"label": "السماح بتنفيذ الدوال ذات الوسائط Nullable فقط على الصفوف التي تكون فيها جميع الوسائط ذات قيم non-NULL"}]}]} />

يُحسّن هذا الإعداد تقييم الدوال التي تُرجع NULL إذا كانت أي وسيطة NULL. وعندما تتجاوز نسبة قيم NULL في وسائط الدالة قيمة short\_circuit\_function\_evaluation\_for\_nulls\_threshold، يتجاوز النظام تقييم الدالة على أساس كل صف على حدة. وبدلًا من ذلك، يُرجع NULL فورًا لجميع الصفوف، ما يجنّب إجراء عمليات حسابية غير ضرورية.

<div id="short_circuit_function_evaluation_for_nulls_threshold">
  ## short\_circuit\_function\_evaluation\_for\_nulls\_threshold
</div>

<SettingsInfoBlock type="Double" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "25.1"},{"label": "1"},{"label": "عتبة نسبة قيم NULL لتنفيذ الدوال ذات الوسيطات Nullable فقط على الصفوف التي تكون فيها جميع الوسيطات ذات قيم غير NULL. يُطبَّق هذا عند تمكين الإعداد short_circuit_function_evaluation_for_nulls."}]}]} />

عتبة نسبة قيم NULL لتنفيذ الدوال ذات الوسيطات Nullable فقط على الصفوف التي تكون فيها جميع الوسيطات ذات قيم غير NULL. يُطبَّق هذا عند تمكين الإعداد short\_circuit\_function\_evaluation\_for\_nulls.
عندما تتجاوز نسبة الصفوف التي تحتوي على قيم NULL إلى إجمالي عدد الصفوف هذه العتبة، فلن تُقيَّم تلك الصفوف التي تحتوي على قيم NULL.
