This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new c5dcb633e9 [fix](hive)throw exception if complex type in text format 
table  (#18013)
c5dcb633e9 is described below

commit c5dcb633e9690712f7a95431f634b768affb6561
Author: slothever <[email protected]>
AuthorDate: Sat Mar 25 23:26:52 2023 +0800

    [fix](hive)throw exception if complex type in text format table  (#18013)
    
    For Hive text input format: the column types ARRAY/MAP/STRUCT are not 
supported yet.
    It will be supported over successive versions.
    
    Co-authored-by: jinzhe <[email protected]>
---
 .../apache/doris/planner/external/ExternalFileScanNode.java    | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/planner/external/ExternalFileScanNode.java
 
b/fe/fe-core/src/main/java/org/apache/doris/planner/external/ExternalFileScanNode.java
index 8ea14f2557..d9c69c212a 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/planner/external/ExternalFileScanNode.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/planner/external/ExternalFileScanNode.java
@@ -293,6 +293,16 @@ public class ExternalFileScanNode extends ExternalScanNode 
{
                 scanProvider = new IcebergScanProvider(hmsSource, analyzer);
                 break;
             case HIVE:
+                String inputFormat = 
hmsTable.getRemoteTable().getSd().getInputFormat();
+                if (inputFormat.contains("TextInputFormat")) {
+                    for (SlotDescriptor slot : desc.getSlots()) {
+                        if (!slot.getType().isScalarType()) {
+                            throw new UserException("For column `" + 
slot.getColumn().getName()
+                                    + "`, The column types ARRAY/MAP/STRUCT 
are not supported yet"
+                                    + " for text input format of Hive. ");
+                        }
+                    }
+                }
                 scanProvider = new HiveScanProvider(hmsTable, desc, 
columnNameToRange);
                 break;
             default:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to