feat(blob): Create blobs in Spark SQL#18347
feat(blob): Create blobs in Spark SQL#18347the-other-tim-brown wants to merge 3 commits intoapache:masterfrom
Conversation
|
@yihua @voonhous @balaji-varadarajan-ai if you can take a look as well, ill try doing an initial pass. |
| normalized.contains("show indexes") || | ||
| normalized.contains("refresh index") | ||
| normalized.contains("refresh index") || | ||
| normalized.contains(" blob") |
There was a problem hiding this comment.
same concern as expressed here #18098 (comment) (although understand now this is not related to the read_blob).
However trying to understand if this would match for things not related to creating a blob col, for example:
-- A table with a column named blob_path — NOT a BLOB type column
CREATE TABLE t (id BIGINT, blob_path STRING)
If this is not a real concern let me know just wanted to bring it up.
| * @return StructType with blob structure | ||
| */ | ||
| def apply(): DataType = { | ||
| HoodieSparkSchemaConverters.toSqlType(HoodieSchema.createBlob())._1 |
There was a problem hiding this comment.
[nit] During sql parsing visitPrimitiveDataType would always be invoked and call this later. I think we might want to cache the call at L40, maybe something like this?
object BlobType {
val dataType: DataType = HoodieSparkSchemaConverters.toSqlType(HoodieSchema.createBlob())._1
def apply(): DataType = dataType
}
|
Outside this comment:#18347 (comment), pr looks good to me! |
Describe the issue this Pull Request addresses
Summary and Changelog
Adds support for creating a Blob field in Spark SQL.
Impact
Allows users to leverage the blob field when using Spark SQL to define their tables
Risk Level
low
Documentation Update
Contributor's checklist