imay commented on a change in pull request #2991: Output null for hll and 
bitmap column when select *
URL: https://github.com/apache/incubator-doris/pull/2991#discussion_r384252598
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/SelectStmt.java
 ##########
 @@ -786,15 +785,14 @@ private void expandStar(Analyzer analyzer, TableName 
tblName) throws AnalysisExc
      * Expand "*" for a particular tuple descriptor by appending
      * refs for each column to selectListExprs.
      */
-    private void expandStar(TableName tblName, TupleDescriptor desc) throws 
AnalysisException {
+    private void expandStar(TableName tblName, TupleDescriptor desc) {
         for (Column col : desc.getTable().getBaseSchema()) {
-            if (col.getDataType() == PrimitiveType.HLL && !fromInsert) {
-                throw new AnalysisException(Type.OnlyMetricTypeErrorMsg);
-            }
-            if (col.getAggregationType() == AggregateType.BITMAP_UNION && 
!fromInsert) {
-                throw new AnalysisException(Type.OnlyMetricTypeErrorMsg);
+            PrimitiveType type = col.getDataType();
 
 Review comment:
   I don't think this change is very suitable.
   1. I think the behavior of `select *` and `select a specific column` should 
be consistent.
   2. The current modification method may have problems when inserting into 
select *, or when sub-queries, such as select hll_union (hll_col) from (select 
*);
   
   I think we can do it in backend. When encountering HLL type or Bitmap type, 
ResultSink can send null directly.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to