enhancement - refactor compute output expression on root fragment in nereids planner - refactor aggregate plan translator - refactor aggregate disassemble rule - slightly refactor sort plan translator - add exchange node on the top of plan node tree if it is needed - slightly refactor PhysicalPlanTranslator#translatePlan fix - slotDescriptor should not reuse between TupleDescriptors - expression's nullable now works fine - remove quotes when parse string literal - set resolvedTupleExprs in SortNode to control output - remove the extra column in sortTupleSlotExprs in SortInfo known issues - aggregate function must be the top expression in output expression (need project in ExecNode in BE) - first phase aggregate could not convert to stream mode. - OlapScanNode do not set data partition - Sort could not process expression like 'order by a + 1' and SortInfo generated in a trick way and should be refactor when we want to support 'order by a + 1' - column prune do not work as expected
26 lines
1.1 KiB
SQL
26 lines
1.1 KiB
SQL
-- Licensed to the Apache Software Foundation (ASF) under one
|
|
-- or more contributor license agreements. See the NOTICE file
|
|
-- distributed with this work for additional information
|
|
-- regarding copyright ownership. The ASF licenses this file
|
|
-- to you under the Apache License, Version 2.0 (the
|
|
-- "License"); you may not use this file except in compliance
|
|
-- with the License. You may obtain a copy of the License at
|
|
--
|
|
-- http://www.apache.org/licenses/LICENSE-2.0
|
|
--
|
|
-- Unless required by applicable law or agreed to in writing,
|
|
-- software distributed under the License is distributed on an
|
|
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
-- KIND, either express or implied. See the License for the
|
|
-- specific language governing permissions and limitations
|
|
-- under the License.
|
|
SELECT SUM(lo_revenue), d_year, p_brand
|
|
FROM lineorder, dates, part, supplier
|
|
WHERE
|
|
lo_orderdate = d_datekey
|
|
AND lo_partkey = p_partkey
|
|
AND lo_suppkey = s_suppkey
|
|
AND p_category = 'MFGR#12'
|
|
AND s_region = 'AMERICA'
|
|
GROUP BY d_year, p_brand
|
|
ORDER BY p_brand; |