File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed
ee/src/storages/fuse/operations Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,11 @@ pub async fn do_refresh_virtual_column(
107107 } ) ;
108108
109109 if !fuse_table. support_virtual_columns ( ) {
110- return Err ( ErrorCode :: VirtualColumnError (
111- "table don't support virtual column" . to_string ( ) ,
112- ) ) ;
110+ return Err ( ErrorCode :: VirtualColumnError ( format ! (
111+ "Table don't support virtual column, storage_format: {} read_only: {}" ,
112+ fuse_table. get_storage_format( ) ,
113+ fuse_table. is_read_only( )
114+ ) ) ) ;
113115 }
114116 let virtual_column_builder = VirtualColumnBuilder :: try_create ( ctx. clone ( ) , source_schema) ?;
115117
Original file line number Diff line number Diff line change @@ -1273,9 +1273,7 @@ impl Table for FuseTable {
12731273 }
12741274
12751275 fn support_virtual_columns ( & self ) -> bool {
1276- if matches ! ( self . storage_format, FuseStorageFormat :: Parquet )
1277- && matches ! ( self . table_type, FuseTableType :: Standard )
1278- {
1276+ if matches ! ( self . storage_format, FuseStorageFormat :: Parquet ) && !self . is_read_only ( ) {
12791277 // ignore persistent system tables {
12801278 if let Ok ( database_name) = self . table_info . database_name ( ) {
12811279 if database_name == "persistent_system" {
Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ use std:: fmt:: Display ;
16+ use std:: fmt:: Formatter ;
1517use std:: str:: FromStr ;
1618
1719use databend_common_exception:: ErrorCode ;
@@ -50,6 +52,15 @@ pub enum FuseStorageFormat {
5052 Native ,
5153}
5254
55+ impl Display for FuseStorageFormat {
56+ fn fmt ( & self , f : & mut Formatter ) -> std:: fmt:: Result {
57+ match self {
58+ FuseStorageFormat :: Parquet => write ! ( f, "Parquet" ) ,
59+ FuseStorageFormat :: Native => write ! ( f, "Native" ) ,
60+ }
61+ }
62+ }
63+
5364impl FromStr for FuseStorageFormat {
5465 type Err = ErrorCode ;
5566
You can’t perform that action at this time.
0 commit comments