Skip to content

Commit

Permalink
feat: add EXPERIMENTAL_BITRIX_ENABLE_JOIN_TYPES flag (#328)
Browse files Browse the repository at this point in the history
* feat: add EXPERIMENTAL_BITRIX_ENABLE_JOIN_TYPES flag

* fix: mypy
  • Loading branch information
ovsds authored Feb 21, 2024
1 parent abbb350 commit 3fbde84
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import os
from typing import (
ClassVar,
Optional,
Expand All @@ -21,8 +22,23 @@
)


def _get_supported_join_types() -> frozenset[JoinType]:
flag = os.environ.get("EXPERIMENTAL_BITRIX_ENABLE_JOIN_TYPES", "false")
if flag.lower() == "true":
return frozenset(
{
JoinType.inner,
JoinType.left,
JoinType.full,
JoinType.right,
}
)

return frozenset()


class BitrixGDSDataSource(PseudoSQLDataSource):
supported_join_types: ClassVar[frozenset[JoinType]] = frozenset()
supported_join_types: ClassVar[frozenset[JoinType]] = _get_supported_join_types()
conn_type = CONNECTION_TYPE_BITRIX24

@property
Expand Down

0 comments on commit 3fbde84

Please sign in to comment.