hvanhovell commented on a change in pull request #32157:
URL: https://github.com/apache/spark/pull/32157#discussion_r613821403
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala
##########
@@ -295,6 +298,31 @@ object DecimalLiteral {
def smallerThanSmallestLong(v: Decimal): Boolean = v < Decimal(Long.MinValue)
}
+object LiteralTreeBits {
+ // Singleton tree pattern BitSet for all Literals that are not true, false,
or null.
+ val literalBits: BitSet = {
Review comment:
Constructing BitSets like this is a bit cumbersome. Can we have a helper
function to create them?
```scala
def bitSet(bits: Int*): BitSet = {
val set: BitSet = new BitSet(TreePattern.maxId)
bits.foreach(set.set)
bits
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]