kou commented on code in PR #45706: URL: https://github.com/apache/arrow/pull/45706#discussion_r1988211341
########## python/pyarrow/tests/test_fs.py: ########## @@ -1463,6 +1463,16 @@ def test_azurefs_options(pickle_module): assert pickle_module.loads(pickle_module.dumps(fs3)) == fs3 assert fs3 != fs2 + fs4 = AzureFileSystem(account_name='fake-account-name', + sas_token='fakesastoken') + assert isinstance(fs4, AzureFileSystem) + assert pickle_module.loads(pickle_module.dumps(fs4)) == fs4 + assert fs4 != fs3 + + with pytest.raises(ValueError): + AzureFileSystem(account_name='fake-account-name', account_key='fakeaccount', + sas_token = 'fakesastoken') Review Comment: ```suggestion sas_token='fakesastoken') ``` ########## python/pyarrow/_azurefs.pyx: ########## @@ -100,6 +105,9 @@ cdef class AzureFileSystem(FileSystem): if account_key: options.ConfigureAccountKeyCredential(tobytes(account_key)) self.account_key = tobytes(account_key) + elif sas_token: + options.ConfigureSASCredential(tobytes(sas_token)) + self.sas_token = tobytes(sas_token) Review Comment: Could you document it? -- 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. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org