Merge pull request #70563 from ClickHouse/backport/24.9/69831

Backport #69831 to 24.9: fix `getSubcolumn` with `LowCardinality` columns
This commit is contained in:
Pavel Kruglov 2024-10-29 11:23:19 +01:00 committed by GitHub
commit c1f1b2eada
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View File

@ -23,6 +23,7 @@ public:
size_t getNumberOfArguments() const override { return 2; }
bool isSuitableForShortCircuitArgumentsExecution(const DataTypesWithConstInfo &) const override { return true; }
bool useDefaultImplementationForConstants() const override { return true; }
bool useDefaultImplementationForLowCardinalityColumns() const override { return false; }
ColumnNumbers getArgumentsThatAreAlwaysConstant() const override { return {1}; }
DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override

View File

@ -140,14 +140,14 @@
[[[([(1,'d')],'d')]]] Array(Array(Nested(t Nested(t Int32, s String), s String)))
[[[[1]]]] Array(Array(Array(Array(Int32))))
[[[([(1,'d')],'d')]]] [['s']] Array(Array(Array(Tuple(Array(Tuple(Int64, String)), String)))) Array(Array(String))
[[[[(1,'d')]]]] [[['d']]] Array(Array(Array(Array(Tuple(\n t Int32,\n s String))))) Array(Array(Array(String)))
[[[[(1,'d')]]]] [[['d']]] Array(Array(Array(Nested(t Int32, s String)))) Array(Array(Array(String)))
[[[[1]]]] [[[['d']]]] Array(Array(Array(Array(Int32)))) Array(Array(Array(Array(String))))
[([([([(1,'d')],'d')],'s')],'s')] Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Int32,\n s String)),\n s String)),\n s String)),\n s String))
[[([([(1,'d')],'d')],'s')]] Array(Nested(t Nested(t Nested(t Int32, s String), s String), s String))
[[[([(1,'d')],'d')]]] Array(Array(Array(Tuple(Array(Tuple(Int64, String)), String))))
[[[[1]]]] Array(Array(Array(Array(Int32))))
[[([([(1,'d')],'d')],'s')]] ['s'] Array(Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Int32,\n s String)),\n s String)),\n s String))) Array(String)
[[[([(1,'d')],'d')]]] [['s']] Array(Array(Array(Tuple(\n t Array(Tuple(\n t Int32,\n s String)),\n s String)))) Array(Array(String))
[[[([(1,'d')],'d')]]] [['s']] Array(Array(Nested(t Nested(t Int32, s String), s String))) Array(Array(String))
[[[[(1,'d')]]]] [[['d']]] Array(Array(Array(Array(Tuple(Int64, String))))) Array(Array(Array(String)))
[[[[1]]]] [[[['d']]]] Array(Array(Array(Array(Int32)))) Array(Array(Array(Array(String))))
[([([([(1,'d')],'d')],'s')],'s')] Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Int32,\n s String)),\n s String)),\n s String)),\n s String))
@ -297,14 +297,14 @@
[[[([(1,'d')],'d')]]] Array(Array(Nested(t Nested(t Int32, s String), s String)))
[[[[1]]]] Array(Array(Array(Array(Int32))))
[[[([(1,'d')],'d')]]] [['s']] Array(Array(Array(Tuple(Array(Tuple(Int64, String)), String)))) Array(Array(String))
[[[[(1,'d')]]]] [[['d']]] Array(Array(Array(Array(Tuple(\n t Int32,\n s String))))) Array(Array(Array(String)))
[[[[(1,'d')]]]] [[['d']]] Array(Array(Array(Nested(t Int32, s String)))) Array(Array(Array(String)))
[[[[1]]]] [[[['d']]]] Array(Array(Array(Array(Int32)))) Array(Array(Array(Array(String))))
[([([([(1,'d')],'d')],'s')],'s')] Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Int32,\n s String)),\n s String)),\n s String)),\n s String))
[[([([(1,'d')],'d')],'s')]] Array(Nested(t Nested(t Nested(t Int32, s String), s String), s String))
[[[([(1,'d')],'d')]]] Array(Array(Array(Tuple(Array(Tuple(Int64, String)), String))))
[[[[1]]]] Array(Array(Array(Array(Int32))))
[[([([(1,'d')],'d')],'s')]] ['s'] Array(Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Int32,\n s String)),\n s String)),\n s String))) Array(String)
[[[([(1,'d')],'d')]]] [['s']] Array(Array(Array(Tuple(\n t Array(Tuple(\n t Int32,\n s String)),\n s String)))) Array(Array(String))
[[[([(1,'d')],'d')]]] [['s']] Array(Array(Nested(t Nested(t Int32, s String), s String))) Array(Array(String))
[[[[(1,'d')]]]] [[['d']]] Array(Array(Array(Array(Tuple(Int64, String))))) Array(Array(Array(String)))
[[[[1]]]] [[[['d']]]] Array(Array(Array(Array(Int32)))) Array(Array(Array(Array(String))))
[([([([(1,'d')],'d')],'s')],'s')] Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Array(Tuple(\n t Int32,\n s String)),\n s String)),\n s String)),\n s String))

View File

@ -0,0 +1 @@
LowCardinality(String)

View File

@ -0,0 +1 @@
SELECT toTypeName(getSubcolumn(tuple('str')::Tuple(a LowCardinality(String)), 'a'))