aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/ImplictCasts
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
commit31773f157bf8164364649b5f470f52dece0a4317 (patch)
tree33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/s-expressions/suites/ImplictCasts
parent2c7938962d8689e175574fc1e817c05049f27905 (diff)
parenteff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff)
downloadydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/s-expressions/suites/ImplictCasts')
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/Arithmetic.yql33
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AsListInferCommonTypeOpt.yql28
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvert.yql35
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByBinContent.yql38
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByContent.yql38
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByIf.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByMinusContent.yql42
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByPlusContent.yql38
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertCoalesce.yql16
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertCoalesceSrtucts.yql10
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoJust.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoJustByIf.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/Compare.yql42
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/Enumerate.yql10
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverData.yql30
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverDataIntegralTypes.yql70
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverDict.yql23
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverList.yql24
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverOptional.yql30
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverStruct.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverTuple.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverVariantStruct.yql24
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverVariantTuple.yql24
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideDictLiteral.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideList.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideListLiteral.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideOpt.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideOptLiteral.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideStruct.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideStructLiteral.yql13
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideTuple.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideTupleLiteral.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariant.yql54
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql29
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/NarrowStruct.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/NullAsOpt.yql11
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/Shift.yql25
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/Skip.yql10
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/Substring.yql10
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/Take.yql10
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructExtraItemsFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructExtraItemsFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructNameMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructNameMismatchFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetNameMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetNameMismatchFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetTypeMismatchFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTypeMismatchFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleExtraItemsFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleExtraItemsFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleNotEnoughItemsFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleNotEnoughItemsFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTargetTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTargetTypeMismatchFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTypeMismatchFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralUnderlyingTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralUnderlyingTypeMismatchFail.yql19
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructExtraItemsFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructExtraItemsFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructNameMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructNameMismatchFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetNameMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetNameMismatchFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetTypeMismatchFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTypeMismatchFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleExtraItemsFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleExtraItemsFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleNotEnoughItemsFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleNotEnoughItemsFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTargetTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTargetTypeMismatchFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTypeMismatchFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantUnderlyingTypeMismatchFail.cfg1
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantUnderlyingTypeMismatchFail.yql22
-rw-r--r--yql/essentials/tests/s-expressions/suites/ImplictCasts/default.cfg1
81 files changed, 1328 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/Arithmetic.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Arithmetic.yql
new file mode 100644
index 0000000000..dfc37d30de
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Arithmetic.yql
@@ -0,0 +1,33 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let res (List (ListType (DataType 'Uint64))))
+(let res (Append res (+ (Int32 '5) (Uint64 '5))))
+(let res (Append res (+ (Int32 '-5) (Uint64 '5))))
+(let res (Append res (+ (Uint64 '5) (Int32 '-5))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let res (List (ListType (DataType 'Uint64))))
+(let res (Append res (- (Int32 '5) (Uint64 '5))))
+(let res (Append res (- (Int32 '-5) (Uint64 '5))))
+(let res (Append res (- (Uint64 '5) (Int32 '-5))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let res (List (ListType (DataType 'Uint64))))
+(let res (Append res (* (Int32 '5) (Uint64 '5))))
+(let res (Append res (* (Int32 '-5) (Uint64 '5))))
+(let res (Append res (* (Uint64 '5) (Int32 '-5))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let res (List (ListType (OptionalType (DataType 'Uint64)))))
+(let res (Append res (/ (Int32 '5) (Uint64 '5))))
+(let res (Append res (/ (Int32 '-5) (Uint64 '5))))
+(let res (Append res (/ (Uint64 '5) (Int32 '-5))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let res (List (ListType (OptionalType (DataType 'Uint64)))))
+(let res (Append res (% (Int32 '5) (Uint64 '5))))
+(let res (Append res (% (Int32 '-5) (Uint64 '5))))
+(let res (Append res (% (Uint64 '5) (Int32 '-5))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AsListInferCommonTypeOpt.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AsListInferCommonTypeOpt.yql
new file mode 100644
index 0000000000..9e4f52e93d
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AsListInferCommonTypeOpt.yql
@@ -0,0 +1,28 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+# Int32, Uint16??? -> Int32???
+(let data (AsList (Int32 '1) (Just (Just (Just (Uint16 '2))))))
+(let world (Write! world res_sink (Key) data '('('type))))
+
+# Int32?, Uint16??? -> Int32???
+(let data (AsList (Just (Int32 '1)) (Just (Just (Just (Uint16 '2))))))
+(let world (Write! world res_sink (Key) data '('('type))))
+
+# Int64?, Null -> Int64?
+(let data (AsList (Just (Int64 '1)) (Null)))
+(let world (Write! world res_sink (Key) data '('('type))))
+
+# Int64?, Nothing(Null?) -> Int64??
+(let data (AsList (Just (Int64 '1)) (Nothing (OptionalType (NullType)))))
+(let world (Write! world res_sink (Key) data '('('type))))
+
+# Int64?, Nothing(Null?)? -> Int64???
+(let data (AsList (Just (Int64 '1)) (Just (Nothing (OptionalType (NullType))))))
+(let world (Write! world res_sink (Key) data '('('type))))
+
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvert.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvert.yql
new file mode 100644
index 0000000000..a326656deb
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvert.yql
@@ -0,0 +1,35 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (Int32 '1)))
+(let data (Append data (Uint8 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint32 '1)))
+(let data (Append data (Uint8 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint64 '1)))
+(let data (Append data (Uint8 '2)))
+(let data (Append data (Uint32 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Int64 '1)))
+(let data (Append data (Uint8 '2)))
+(let data (Append data (Int32 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Float '1)))
+(let data (Append data (Uint8 '2)))
+(let data (Append data (Int32 '2)))
+(let data (Append data (Uint32 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Double '1)))
+(let data (Append data (Uint8 '2)))
+(let data (Append data (Int32 '2)))
+(let data (Append data (Uint32 '2)))
+(let data (Append data (Int64 '2)))
+(let data (Append data (Uint64 '2)))
+(let data (Append data (Float '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByBinContent.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByBinContent.yql
new file mode 100644
index 0000000000..d3a2fa7c5a
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByBinContent.yql
@@ -0,0 +1,38 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (Uint8 '1)))
+(let data (Append data (Uint32 'x"02000000")))
+(let data (Append data (Int32 'x"02000000")))
+(let data (Append data (Uint64 'x"0200000000000000")))
+(let data (Append data (Int64 'x"0200000000000000")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Int32 '1)))
+(let data (Append data (Uint32 'x"02000000")))
+(let data (Append data (Int32 'x"02000000")))
+(let data (Append data (Uint64 'x"0200000000000000")))
+(let data (Append data (Int64 'x"0200000000000000")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint32 '1)))
+(let data (Append data (Uint32 'x"02000000")))
+(let data (Append data (Int32 'x"02000000")))
+(let data (Append data (Uint64 'x"0200000000000000")))
+(let data (Append data (Int64 'x"0200000000000000")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Int64 '1)))
+(let data (Append data (Uint32 'x"02000000")))
+(let data (Append data (Int32 'x"02000000")))
+(let data (Append data (Uint64 'x"0200000000000000")))
+(let data (Append data (Int64 'x"0200000000000000")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint64 '1)))
+(let data (Append data (Uint32 'x"02000000")))
+(let data (Append data (Int32 'x"02000000")))
+(let data (Append data (Uint64 'x"0200000000000000")))
+(let data (Append data (Int64 'x"0200000000000000")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByContent.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByContent.yql
new file mode 100644
index 0000000000..478ba0b492
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByContent.yql
@@ -0,0 +1,38 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (Uint8 '1)))
+(let data (Append data (Uint32 '2)))
+(let data (Append data (Int32 '2)))
+(let data (Append data (Uint64 '2)))
+(let data (Append data (Int64 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Int32 '1)))
+(let data (Append data (Uint32 '2)))
+(let data (Append data (Int32 '2)))
+(let data (Append data (Uint64 '2)))
+(let data (Append data (Int64 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint32 '1)))
+(let data (Append data (Uint32 '2)))
+(let data (Append data (Int32 '2)))
+(let data (Append data (Uint64 '2)))
+(let data (Append data (Int64 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Int64 '1)))
+(let data (Append data (Uint32 '2)))
+(let data (Append data (Int32 '2)))
+(let data (Append data (Uint64 '2)))
+(let data (Append data (Int64 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint64 '1)))
+(let data (Append data (Uint32 '2)))
+(let data (Append data (Int32 '2)))
+(let data (Append data (Uint64 '2)))
+(let data (Append data (Int64 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByIf.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByIf.yql
new file mode 100644
index 0000000000..1008cf6499
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByIf.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (Uint64 '1))
+(let data (If (Bool 'true) data (Double '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByMinusContent.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByMinusContent.yql
new file mode 100644
index 0000000000..afe7c04735
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByMinusContent.yql
@@ -0,0 +1,42 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (Uint8 '1)))
+(let data (Append data (Minus (Int32 '-2))))
+(let data (Append data (Minus (Uint32 'x"FCFFFFFF"))))
+(let data (Append data (Minus (Int64 '-2))))
+(let data (Append data (Minus (Uint64 'x"FCFFFFFFFFFFFFFF"))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Int32 '1)))
+(let data (Append data (Minus (Int32 '-2))))
+(let data (Append data (Minus (Int32 '2))))
+(let data (Append data (Minus (Uint32 'x"FCFFFFFF"))))
+(let data (Append data (Minus (Int64 '-2))))
+(let data (Append data (Minus (Int64 '2))))
+(let data (Append data (Minus (Uint64 'x"FCFFFFFFFFFFFFFF"))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint32 '1)))
+(let data (Append data (Minus (Int32 '-2))))
+(let data (Append data (Minus (Uint32 'x"FCFFFFFF"))))
+(let data (Append data (Minus (Int64 '-2))))
+(let data (Append data (Minus (Uint64 'x"FCFFFFFFFFFFFFFF"))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Int64 '1)))
+(let data (Append data (Minus (Int32 '-2))))
+(let data (Append data (Minus (Int32 '2))))
+(let data (Append data (Minus (Uint32 'x"FCFFFFFF"))))
+(let data (Append data (Minus (Int64 '-2))))
+(let data (Append data (Minus (Int64 '2))))
+(let data (Append data (Minus (Uint64 'x"FCFFFFFFFFFFFFFF"))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint64 '1)))
+(let data (Append data (Minus (Int32 '-2))))
+(let data (Append data (Minus (Uint32 'x"FCFFFFFF"))))
+(let data (Append data (Minus (Int64 '-2))))
+(let data (Append data (Minus (Uint64 'x"FCFFFFFFFFFFFFFF"))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByPlusContent.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByPlusContent.yql
new file mode 100644
index 0000000000..27ac41dba1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertByPlusContent.yql
@@ -0,0 +1,38 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (Uint8 '1)))
+(let data (Append data (Plus (Uint32 '2))))
+(let data (Append data (Plus (Int32 '2))))
+(let data (Append data (Plus (Uint64 '2))))
+(let data (Append data (Plus (Int64 '2))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Int32 '1)))
+(let data (Append data (Plus (Uint32 '2))))
+(let data (Append data (Plus (Int32 '2))))
+(let data (Append data (Plus (Uint64 '2))))
+(let data (Append data (Plus (Int64 '2))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint32 '1)))
+(let data (Append data (Plus (Uint32 '2))))
+(let data (Append data (Plus (Int32 '2))))
+(let data (Append data (Plus (Uint64 '2))))
+(let data (Append data (Plus (Int64 '2))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Int64 '1)))
+(let data (Append data (Plus (Uint32 '2))))
+(let data (Append data (Plus (Int32 '2))))
+(let data (Append data (Plus (Uint64 '2))))
+(let data (Append data (Plus (Int64 '2))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (AsList (Uint64 '1)))
+(let data (Append data (Plus (Uint32 '2))))
+(let data (Append data (Plus (Int32 '2))))
+(let data (Append data (Plus (Uint64 '2))))
+(let data (Append data (Plus (Int64 '2))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertCoalesce.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertCoalesce.yql
new file mode 100644
index 0000000000..9977eefc30
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertCoalesce.yql
@@ -0,0 +1,16 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (Coalesce (Nothing (OptionalType (DataType 'Uint32))) (Uint64 '1)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (Coalesce (Nothing (OptionalType (DataType 'Uint64))) (Int64 '2)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (Coalesce (Nothing (OptionalType (DataType 'Int64))) (+ (Uint32 '1) (Uint32 '2))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (Coalesce (Nothing (OptionalType (DataType 'Uint32))) (Just (Uint32 '4))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertCoalesceSrtucts.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertCoalesceSrtucts.yql
new file mode 100644
index 0000000000..4ea96cadab
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoConvertCoalesceSrtucts.yql
@@ -0,0 +1,10 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (Coalesce (AsStruct '('"a" (Int32 '1))) (AsStruct)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoJust.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoJust.yql
new file mode 100644
index 0000000000..ce67a47d55
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoJust.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (Just (Just (String 'a)))))
+(let data (Append data (String 'b)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoJustByIf.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoJustByIf.yql
new file mode 100644
index 0000000000..88c2e397a7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/AutoJustByIf.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (Just (Just (String 'a))))
+(let data (If (Bool 'true) data (String 'b)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/Compare.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Compare.yql
new file mode 100644
index 0000000000..3f2fa9519d
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Compare.yql
@@ -0,0 +1,42 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let res (List (ListType (DataType 'Bool))))
+(let res (Append res (== (Int32 '5) (Uint64 '5))))
+(let res (Append res (== (Int32 '-5) (Uint64 '5))))
+(let res (Append res (== (Uint64 '5) (Int32 '-5))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let res (List (ListType (DataType 'Bool))))
+(let res (Append res (!= (Int32 '5) (Uint64 '5))))
+(let res (Append res (!= (Int32 '-5) (Uint64 '5))))
+(let res (Append res (!= (Uint64 '5) (Int32 '-5))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let res (List (ListType (DataType 'Bool))))
+(let res (Append res (< (Int32 '5) (Uint64 '5))))
+(let res (Append res (< (Int32 '-1) (Uint64 '5))))
+(let res (Append res (< (Int32 '1) (Uint64 '5))))
+(let res (Append res (< (Uint64 '1) (Int32 '-2))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let res (List (ListType (DataType 'Bool))))
+(let res (Append res (<= (Int32 '5) (Uint64 '5))))
+(let res (Append res (<= (Int32 '-1) (Uint64 '5))))
+(let res (Append res (<= (Int32 '1) (Uint64 '5))))
+(let res (Append res (<= (Uint64 '1) (Int32 '-2))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let res (List (ListType (DataType 'Bool))))
+(let res (Append res (> (Int32 '5) (Uint64 '5))))
+(let res (Append res (> (Int32 '-1) (Uint64 '5))))
+(let res (Append res (> (Int32 '1) (Uint64 '5))))
+(let res (Append res (> (Uint64 '1) (Int32 '-2))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let res (List (ListType (DataType 'Bool))))
+(let res (Append res (>= (Int32 '5) (Uint64 '5))))
+(let res (Append res (>= (Int32 '-1) (Uint64 '5))))
+(let res (Append res (>= (Int32 '1) (Uint64 '5))))
+(let res (Append res (>= (Uint64 '1) (Int32 '-2))))
+(let world (Write! world res_sink (Key) res '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/Enumerate.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Enumerate.yql
new file mode 100644
index 0000000000..20547b0aaa
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Enumerate.yql
@@ -0,0 +1,10 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (Enumerate (AsList (String 'a) (String 'b)) (Int64 '2) (Uint32 '1)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverData.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverData.yql
new file mode 100644
index 0000000000..4da2353218
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverData.yql
@@ -0,0 +1,30 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+
+# result is true for all tests below
+
+# To float
+(let value (Uint64 '18446744073709551615))
+(let commonType (DataType 'Float))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# To double
+(let value (Int64 '"-9223372036854775808"))
+(let commonType (DataType 'Double))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# To string
+(let value (Utf8 '"проверка"))
+(let commonType (DataType 'String))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+(let world (Commit! world res_sink))
+(return world)
+
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverDataIntegralTypes.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverDataIntegralTypes.yql
new file mode 100644
index 0000000000..bab448cfa0
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverDataIntegralTypes.yql
@@ -0,0 +1,70 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+
+# Both signed (true)
+(let value (Int32 '0))
+(let commonType (DataType 'Int64))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# Both unsigned (true)
+(let value (Uint8 '0))
+(let commonType (DataType 'Uint16))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# uint32(0) -> int32 (true)
+(let value (Uint32 '0))
+(let commonType (DataType 'Int32))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# uint32(2^31-1) -> int32 (true)
+(let value (Uint32 '2147483647))
+(let commonType (DataType 'Int32))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# uint32(2^31) -> int32 (false)
+(let value (Uint32 '2147483648))
+(let commonType (DataType 'Int32))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# uint32(2^32-1) -> int32 (false)
+(let value (Uint32 '4294967295))
+(let commonType (DataType 'Int32))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# int16(0) -> uint32 (true)
+(let value (Int16 '0))
+(let commonType (DataType 'Uint32))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# int16(32767) -> uint32 (true)
+(let value (Int16 '32767))
+(let commonType (DataType 'Uint32))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# int16(-1) -> uint32 (false)
+(let value (Int16 '"-1"))
+(let commonType (DataType 'Uint32))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# int16(-32768) -> uint32 (false)
+(let value (Int16 '"-32768"))
+(let commonType (DataType 'Uint32))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+(let world (Commit! world res_sink))
+(return world)
+
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverDict.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverDict.yql
new file mode 100644
index 0000000000..17dbdd3de4
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverDict.yql
@@ -0,0 +1,23 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+
+# Dict<Uint32, Int16>> -> Dict<Uint32, Uint64> (false)
+(let value (AsDict '((Uint32 '0) (Int16 '"-1"))))
+(let commonType (DictType (DataType 'Uint32) (DataType 'Uint64)))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# Dict<Uint32, Uint16>> -> Dict<Uint32, Uint64> (true)
+(let value (AsDict '((Uint32 '0) (Uint16 '0))))
+(let commonType (DictType (DataType 'Uint32) (DataType 'Uint64)))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+
+(let world (Commit! world res_sink))
+(return world)
+
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverList.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverList.yql
new file mode 100644
index 0000000000..9622fabe4b
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverList.yql
@@ -0,0 +1,24 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+
+# List<Uint16> -> List<Int16> (false)
+(let value (AsList (Uint16 '32767)))
+(let value (Append value (Uint16 '32768)))
+(let commonType (ListType (DataType 'Int16)))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# List<Uint16> -> List<UInt32> (true)
+(let value (AsList (Uint16 '32767)))
+(let value (Append value (Uint16 '32768)))
+(let commonType (ListType (DataType 'Uint32)))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+(let world (Commit! world res_sink))
+(return world)
+
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverOptional.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverOptional.yql
new file mode 100644
index 0000000000..468cab9df7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverOptional.yql
@@ -0,0 +1,30 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+
+# result is true for all tests below
+
+# Int32 -> Uint64?? (false)
+(let value (Int32 '"-1"))
+(let commonType (OptionalType (OptionalType (DataType 'Uint64))))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# Just(Int32) -> Uint64?? (false)
+(let value (Just (Int32 '"-1")))
+(let commonType (OptionalType (OptionalType (DataType 'Uint64))))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# Nothing(Int32)? -> Uint64?? (true)
+(let value (Just (Nothing (OptionalType (DataType 'Int32)))))
+(let commonType (OptionalType (OptionalType (DataType 'Uint64))))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+(let world (Commit! world res_sink))
+(return world)
+
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverStruct.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverStruct.yql
new file mode 100644
index 0000000000..ae8830e61f
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverStruct.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+
+# Struct<Int16, Int16>> -> Struct<Uint32, Uint64> (false)
+(let value (AsStruct '('"a" (Int16 '0)) '('"b" (Int16 '"-1"))))
+(let commonType (StructType '('"a" (DataType 'Uint32)) '('"b" (DataType 'Uint64))))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# Struct<Uint16, Uint16>> -> Struct<Uint32, Uint64> (true)
+(let value (AsStruct '('"a" (Uint16 '0)) '('"b" (Uint16 '0))))
+(let commonType (StructType '('"a" (DataType 'Uint32)) '('"b" (DataType 'Uint64))))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+(let world (Commit! world res_sink))
+(return world)
+
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverTuple.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverTuple.yql
new file mode 100644
index 0000000000..3461a8d239
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverTuple.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+
+# (Int16, Int16, Int16, Int16, Int16) -> (Uint32, Uint32, Uint64, Uint32, Uint64) (false)
+(let value '((Int16 '0) (Int16 '"-1") (Int16 '0) (Int16 '0) (Int16 '0)))
+(let commonType (TupleType (DataType 'Uint32) (DataType 'Uint32) (DataType 'Uint64) (DataType 'Uint32) (DataType 'Uint64)))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# (Uint16, Uint16, Uint16, Uint16, Uint16) -> (Uint32, Uint32, Uint64, Uint32, Uint64) (true)
+(let value '((Uint16 '0) (Uint16 '0) (Uint16 '0) (Uint16 '0) (Uint16 '0)))
+(let commonType (TupleType (DataType 'Uint32) (DataType 'Uint32) (DataType 'Uint64) (DataType 'Uint32) (DataType 'Uint64)))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+(let world (Commit! world res_sink))
+(return world)
+
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverVariantStruct.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverVariantStruct.yql
new file mode 100644
index 0000000000..a6de909851
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverVariantStruct.yql
@@ -0,0 +1,24 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+
+# Variant<Struct<Int16, Int16>>> -> Variant<Struct<Uint32, Uint64>> (false)
+(let variantType (VariantType (StructType '('"a" (DataType 'Int16)) '('"b" (DataType 'Int16)))))
+(let value (Variant (Int16 '"-1") '"a" variantType))
+(let commonType (VariantType (StructType '('"a" (DataType 'Uint32)) '('"b" (DataType 'Uint64)))))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# Variant<Struct<Uint16, Uint16>>> -> Variant<Struct<Uint32, Uint64>> (true)
+(let variantType (VariantType (StructType '('"a" (DataType 'Uint16)) '('"b" (DataType 'Uint16)))))
+(let value (Variant (Uint16 '0) '"a" variantType))
+(let commonType (VariantType (StructType '('"a" (DataType 'Uint32)) '('"b" (DataType 'Uint64)))))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+(let world (Commit! world res_sink))
+(return world)
+
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverVariantTuple.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverVariantTuple.yql
new file mode 100644
index 0000000000..28dd639e69
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/ImplicitEqualsOverVariantTuple.yql
@@ -0,0 +1,24 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+
+# Variant<Tuple<Int16, Int32>>> -> Variant<Tuple<Uint32, Uint64>> (false)
+(let variantType (VariantType (TupleType (DataType 'Int16) (DataType 'Int32))))
+(let value (Variant (Int32 '"-1") '1 variantType))
+(let commonType (VariantType (TupleType (DataType 'Uint32) (DataType 'Uint64))))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+# Variant<Tuple<Uint16, Uint32>>> -> Variant<Tuple<Uint32, Uint64>> (true)
+(let variantType (VariantType (TupleType (DataType 'Uint16) (DataType 'Uint32))))
+(let value (Variant (Uint32 '0) '1 variantType))
+(let commonType (VariantType (TupleType (DataType 'Uint32) (DataType 'Uint64))))
+(let imlicitEqualsResult (Exists (StrictCast value commonType)))
+(let world (Write! world res_sink (Key) imlicitEqualsResult '('('type))))
+
+(let world (Commit! world res_sink))
+(return world)
+
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideDictLiteral.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideDictLiteral.yql
new file mode 100644
index 0000000000..f7393666cc
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideDictLiteral.yql
@@ -0,0 +1,13 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (AsDict '((Uint32 '12) (Uint32 '34)))))
+(let data (Append data (AsDict '((Uint32 '56) (Int64 '78)))))
+(let dt (DictType (DataType 'Uint32) (DataType 'Int64)))
+(let data (Append data (Dict dt '((Uint32 '90) (Int64 '12)))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideList.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideList.yql
new file mode 100644
index 0000000000..b2259327f1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideList.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (AsList (Int64 '12))))
+(let data (Append data (AsList (Int32 '-5))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideListLiteral.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideListLiteral.yql
new file mode 100644
index 0000000000..bd0adcd454
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideListLiteral.yql
@@ -0,0 +1,13 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (AsList (Uint32 '12))))
+(let data (Append data (AsList (Int64 '34))))
+(let lt (ListType (DataType 'Int64)))
+(let data (Append data (List lt (Int64 '56))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideOpt.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideOpt.yql
new file mode 100644
index 0000000000..ddf3ad70b0
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideOpt.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (Just (Int64 '12))))
+(let data (Append data (Just (Int32 '-5))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideOptLiteral.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideOptLiteral.yql
new file mode 100644
index 0000000000..52b4d2872a
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideOptLiteral.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (Just (Uint32 '12))))
+(let data (Append data (Just (Int64 '34))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideStruct.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideStruct.yql
new file mode 100644
index 0000000000..4bf5f79adb
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideStruct.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (AsStruct '('key (Just (Int64 '12))))))
+(let data (Append data (AsStruct '('key (Int64 '34)))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideStructLiteral.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideStructLiteral.yql
new file mode 100644
index 0000000000..69051e7c19
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideStructLiteral.yql
@@ -0,0 +1,13 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (AsStruct '('x (Uint32 '12)))))
+(let data (Append data (AsStruct '('x (Int64 '34)))))
+(let st (StructType '('x (DataType 'Int64))))
+(let data (Append data (Struct st '('x (Int64 '56)))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideTuple.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideTuple.yql
new file mode 100644
index 0000000000..a06b03fe9d
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideTuple.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList '((Just (Int64 '12)))))
+(let data (Append data '((Int64 '34))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideTupleLiteral.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideTupleLiteral.yql
new file mode 100644
index 0000000000..28da7c8617
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideTupleLiteral.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList '((Uint32 '12))))
+(let data (Append data '((Int64 '34))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariant.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariant.yql
new file mode 100644
index 0000000000..2acee2f12b
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariant.yql
@@ -0,0 +1,54 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+# Variant over tuple
+
+(let vt (ParseType '"Variant<Int64, Struct<A:Int64, B:Double>>"))
+(let vt2 (ParseType '"Variant<Int32, Struct<A:Int32, B:Double>>"))
+
+(let testcase1 (AsList (Variant (Int64 '10) '0 vt)))
+
+(let argBody (lambda '() (Variant (Int32 '11) '0 vt2)))
+(let argType (CallableType '() '(vt2)))
+(let argCallable (Callable argType argBody))
+(let arg (Apply argCallable))
+(let testcase1 (Append testcase1 arg))
+
+(let argBody (lambda '() (Variant (AsStruct '('A (Int64 '25)) '('B (Double '15.5))) '1 vt2)))
+(let argType (CallableType '() '(vt2)))
+(let argCallable (Callable argType argBody))
+(let arg (Apply argCallable))
+(let testcase1 (Append testcase1 arg))
+
+# Variant over struct
+
+(let vts (ParseType '"Variant<A:Int64, B:Struct<A:Int64, B:Double>>"))
+(let vts2 (ParseType '"Variant<A:Int32, B:Struct<A:Int32, B:Double>>"))
+(let vts3 (ParseType '"Variant<A:Int32>"))
+
+(let testcase2 (AsList (Variant (Int64 '10) 'A vts)))
+
+(let argBody (lambda '() (Variant (Int32 '11) 'A vts2)))
+(let argType (CallableType '() '(vts2)))
+(let argCallable (Callable argType argBody))
+(let arg (Apply argCallable))
+(let testcase2 (Append testcase2 arg))
+
+(let argBody (lambda '() (Variant (AsStruct '('A (Int64 '25)) '('B (Double '15.5))) 'B vts2)))
+(let argType (CallableType '() '(vts2)))
+(let argCallable (Callable argType argBody))
+(let arg (Apply argCallable))
+(let testcase2 (Append testcase2 arg))
+
+(let argBody (lambda '() (Variant (Int32 '11) 'A vts3)))
+(let argType (CallableType '() '(vts3)))
+(let argCallable (Callable argType argBody))
+(let arg (Apply argCallable))
+(let testcase2 (Append testcase2 arg))
+
+(let world (Write! world res_sink (Key) '(testcase1 testcase2) '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql
new file mode 100644
index 0000000000..bbc1bfa584
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/InsideVariantLiteral.yql
@@ -0,0 +1,29 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+# Variant over struct
+
+(let vt (ParseType '"Variant<Int64, Struct<A:Int64, B:Double>>"))
+(let vt2 (ParseType '"Variant<Int32, Struct<A:Int32, B:Double>>"))
+
+(let testcase1 (AsList (Variant (Int64 '10) '0 vt)))
+(let testcase1 (Append testcase1 (Variant (Int32 '11) '0 vt2)))
+(let testcase1 (Append testcase1 (Variant (AsStruct '('A (Int64 '25)) '('B (Double '15.5))) '1 vt2)))
+
+# Variant over tuple
+
+(let vts (ParseType '"Variant<A:Int64, B:Struct<A:Int64, B:Double>>"))
+(let vts2 (ParseType '"Variant<A:Int32, B:Struct<A:Int32, B:Double>>"))
+(let vts3 (ParseType '"Variant<A:Int32>"))
+
+(let testcase2 (AsList (Variant (Int64 '10) 'A vts)))
+(let testcase2 (Append testcase2 (Variant (Int32 '11) 'A vts2)))
+(let testcase2 (Append testcase2 (Variant (AsStruct '('A (Int64 '25)) '('B (Double '15.5))) 'B vts2)))
+(let testcase2 (Append testcase2 (Variant (Int32 '11) 'A vts3)))
+
+(let world (Write! world res_sink (Key) '(testcase1 testcase2) '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/NarrowStruct.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/NarrowStruct.yql
new file mode 100644
index 0000000000..8c5bc62595
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/NarrowStruct.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (AsList (AsStruct '('key (Just (Int64 '12))))))
+(let data (Append data (AsStruct '('key (Int64 '34)) '('value (String 'foo)))))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/NullAsOpt.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/NullAsOpt.yql
new file mode 100644
index 0000000000..cf59f2bb0c
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/NullAsOpt.yql
@@ -0,0 +1,11 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let ct (ParseType '"(Uint32?,Uint32)->Uint32"))
+(let callable (Callable ct (lambda '(x y) (Coalesce x y))))
+(let world (Write! world res_sink (Key) (Apply callable (Null) (Uint32 '2)) '()))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/Shift.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Shift.yql
new file mode 100644
index 0000000000..718fabeac3
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Shift.yql
@@ -0,0 +1,25 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (ShiftLeft (Int32 '"1") (Int64 '"10")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (ShiftLeft (Int64 '"1") (Int64 '"10")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (ShiftLeft (Int32 '"1") (Int64 '"40")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (ShiftLeft (Int64 '"1") (Int64 '"40")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(let data (ShiftLeft (Just (Int32 '"1")) (Int64 '"10")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (ShiftLeft (Just (Int64 '"1")) (Int64 '"10")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (ShiftLeft (Just (Int32 '"1")) (Int64 '"40")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let data (ShiftLeft (Just (Int64 '"1")) (Int64 '"40")))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/Skip.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Skip.yql
new file mode 100644
index 0000000000..e906d237e5
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Skip.yql
@@ -0,0 +1,10 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (Skip (AsList (String 'a) (String 'b)) (Int64 '1)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/Substring.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Substring.yql
new file mode 100644
index 0000000000..2de7c5efe9
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Substring.yql
@@ -0,0 +1,10 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (Substring (String 'abcde) (Int64 '2) (Uint64 '1)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/Take.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Take.yql
new file mode 100644
index 0000000000..b91a23e1de
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/Take.yql
@@ -0,0 +1,10 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+
+(let res_sink (DataSink 'result))
+(let data (Take (AsList (String 'a) (String 'b)) (Int64 '1)))
+(let world (Write! world res_sink (Key) data '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+)
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructExtraItemsFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructExtraItemsFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructExtraItemsFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructExtraItemsFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructExtraItemsFail.yql
new file mode 100644
index 0000000000..a2d9759568
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructExtraItemsFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)) '('D (DataType 'Int32)))))
+(let test (Variant (Int32 '0) 'B testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructNameMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructNameMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructNameMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructNameMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructNameMismatchFail.yql
new file mode 100644
index 0000000000..ac57358f03
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructNameMismatchFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('X (DataType 'Int32)))))
+(let test (Variant (Int32 '0) 'B testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetNameMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetNameMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetNameMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetNameMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetNameMismatchFail.yql
new file mode 100644
index 0000000000..a4e5f7dd40
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetNameMismatchFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('X (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let test (Variant (Int32 '0) 'X testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetTypeMismatchFail.yql
new file mode 100644
index 0000000000..a7bfc3ca2a
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTargetTypeMismatchFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Float)) '('C (DataType 'Int32)))))
+(let test (Variant (Float '0) 'B testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTypeMismatchFail.yql
new file mode 100644
index 0000000000..cc6a372e44
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverStructTypeMismatchFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Float)))))
+(let test (Variant (Int32 '0) 'B testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleExtraItemsFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleExtraItemsFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleExtraItemsFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleExtraItemsFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleExtraItemsFail.yql
new file mode 100644
index 0000000000..d6e73eab29
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleExtraItemsFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let orig (Variant (Int32 '0) '1 origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let test (Variant (Int32 '0) '1 testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleNotEnoughItemsFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleNotEnoughItemsFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleNotEnoughItemsFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleNotEnoughItemsFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleNotEnoughItemsFail.yql
new file mode 100644
index 0000000000..e0419e94da
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleNotEnoughItemsFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let orig (Variant (Int32 '0) '1 origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let test (Variant (Int32 '0) '1 testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTargetTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTargetTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTargetTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTargetTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTargetTypeMismatchFail.yql
new file mode 100644
index 0000000000..615950d586
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTargetTypeMismatchFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let orig (Variant (Int32 '0) '1 origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Float) (DataType 'Int32))))
+(let test (Variant (Float '0) '1 testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTypeMismatchFail.yql
new file mode 100644
index 0000000000..b9d7408383
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralOverTupleTypeMismatchFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let orig (Variant (Int32 '0) '1 origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Float))))
+(let test (Variant (Int32 '0) '1 testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralUnderlyingTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralUnderlyingTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralUnderlyingTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralUnderlyingTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralUnderlyingTypeMismatchFail.yql
new file mode 100644
index 0000000000..d58f23fe27
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantLiteralUnderlyingTypeMismatchFail.yql
@@ -0,0 +1,19 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let test (Variant (Int32 '0) '1 testType))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructExtraItemsFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructExtraItemsFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructExtraItemsFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructExtraItemsFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructExtraItemsFail.yql
new file mode 100644
index 0000000000..80492a709e
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructExtraItemsFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)) '('D (DataType 'Int32)))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Int32 '0) 'B testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructNameMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructNameMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructNameMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructNameMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructNameMismatchFail.yql
new file mode 100644
index 0000000000..b71b50dff7
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructNameMismatchFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('X (DataType 'Int32)))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Int32 '0) 'B testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetNameMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetNameMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetNameMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetNameMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetNameMismatchFail.yql
new file mode 100644
index 0000000000..bd91e105e0
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetNameMismatchFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('X (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Int32 '0) 'X testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetTypeMismatchFail.yql
new file mode 100644
index 0000000000..f40ab1d5d8
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTargetTypeMismatchFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Float)) '('C (DataType 'Int32)))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Float '0) 'B testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTypeMismatchFail.yql
new file mode 100644
index 0000000000..aa0ab07e67
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverStructTypeMismatchFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Float)))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Int32 '0) 'B testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleExtraItemsFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleExtraItemsFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleExtraItemsFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleExtraItemsFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleExtraItemsFail.yql
new file mode 100644
index 0000000000..5c9d947981
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleExtraItemsFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let orig (Variant (Int32 '0) '1 origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Int32 '0) '1 testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleNotEnoughItemsFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleNotEnoughItemsFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleNotEnoughItemsFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleNotEnoughItemsFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleNotEnoughItemsFail.yql
new file mode 100644
index 0000000000..2ececbce27
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleNotEnoughItemsFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let orig (Variant (Int32 '0) '1 origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Int32 '0) '1 testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTargetTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTargetTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTargetTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTargetTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTargetTypeMismatchFail.yql
new file mode 100644
index 0000000000..21c992bea5
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTargetTypeMismatchFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let orig (Variant (Int32 '0) '1 origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Float) (DataType 'Int32))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Float '0) '1 testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTypeMismatchFail.yql
new file mode 100644
index 0000000000..be762d2421
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantOverTupleTypeMismatchFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let orig (Variant (Int32 '0) '1 origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Float))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Int32 '0) '1 testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantUnderlyingTypeMismatchFail.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantUnderlyingTypeMismatchFail.cfg
new file mode 100644
index 0000000000..eb2e5315d1
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantUnderlyingTypeMismatchFail.cfg
@@ -0,0 +1 @@
+xfail \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantUnderlyingTypeMismatchFail.yql b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantUnderlyingTypeMismatchFail.yql
new file mode 100644
index 0000000000..01a658c16e
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/VariantUnderlyingTypeMismatchFail.yql
@@ -0,0 +1,22 @@
+(
+(let config (DataSource 'config))
+(let world (Configure! world config 'PureDataSource 'yt))
+(let res_sink (DataSink 'result))
+
+(let origType (VariantType (StructType '('A (DataType 'Int32)) '('B (DataType 'Int32)) '('C (DataType 'Int32)))))
+(let orig (Variant (Int32 '0) 'B origType))
+
+(let testcase (AsList orig))
+
+(let testType (VariantType (TupleType (DataType 'Int32) (DataType 'Int32) (DataType 'Int32))))
+(let testCallableType (CallableType '() '(testType)))
+(let testBody (lambda '() (Variant (Int32 '0) '1 testType)))
+(let testCallable (Callable testCallableType testBody))
+(let test (Apply testCallable))
+
+(let testcase (Append testcase test))
+
+(let world (Write! world res_sink (Key) testcase '('('type))))
+(let world (Commit! world res_sink))
+(return world)
+) \ No newline at end of file
diff --git a/yql/essentials/tests/s-expressions/suites/ImplictCasts/default.cfg b/yql/essentials/tests/s-expressions/suites/ImplictCasts/default.cfg
new file mode 100644
index 0000000000..00dec6c3f8
--- /dev/null
+++ b/yql/essentials/tests/s-expressions/suites/ImplictCasts/default.cfg
@@ -0,0 +1 @@
+res result.txt